diff --git a/convlab/util/multiwoz/lexicalize.py b/convlab/util/multiwoz/lexicalize.py index 1e5f7ce69eb046e391d752533d024cf9b766ff66..8fd794a3aa6fd7fe641c94fec6d7ea3ee6e99c60 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'