From 91cc9ee774cbfa69bee12a412025a68c0fb6126f Mon Sep 17 00:00:00 2001
From: liangrz15 <liangrz15@mails.tsinghua.edu.cn>
Date: Tue, 2 Mar 2021 21:44:32 +0800
Subject: [PATCH] fix the bug of multiwoz lexicalize (#178)

---
 convlab2/util/multiwoz/lexicalize.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/convlab2/util/multiwoz/lexicalize.py b/convlab2/util/multiwoz/lexicalize.py
index d9ccaf5..14227b8 100755
--- a/convlab2/util/multiwoz/lexicalize.py
+++ b/convlab2/util/multiwoz/lexicalize.py
@@ -54,8 +54,9 @@ def lexicalize_da(meta, entities, state, requestable, cur_domain=None):
                 else:
                     continue
             for pair in v:
-                if pair[0] in state[domain.lower()]['semi']:
-                    pair[1] = state[domain.lower()]['semi'][pair[0]]
+                slot = REF_SYS_DA[domain][pair[0]]
+                if slot in state[domain.lower()]['semi']:
+                    pair[1] = state[domain.lower()]['semi'][slot]
                 else:
                     pair[1] = 'none'
         else:
-- 
GitLab