From 6ccced5d25bcb3eba322699de1b992093b70ac9a Mon Sep 17 00:00:00 2001 From: Christian <christian.geishauser@hhu.de> Date: Thu, 30 Mar 2023 15:31:01 +0200 Subject: [PATCH] small bug fix caused when using T5 DST in the pipeline --- convlab/util/multiwoz/lexicalize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convlab/util/multiwoz/lexicalize.py b/convlab/util/multiwoz/lexicalize.py index 1e5f7ce6..8fd794a3 100755 --- a/convlab/util/multiwoz/lexicalize.py +++ b/convlab/util/multiwoz/lexicalize.py @@ -87,7 +87,7 @@ def lexicalize_da(meta, entities, state, requestable): pair[1] = entities[domain][n][slot.capitalize()] elif slot_old in entities[domain][n]: pair[1] = entities[domain][n][slot_old] - elif slot in state[domain]: + elif state.get(domain) is not None and slot in state.get(domain): pair[1] = state[domain][slot] else: pair[1] = 'not available' -- GitLab