Skip to content
Snippets Groups Projects
Commit 4eb9bf6f authored by Christian's avatar Christian
Browse files

changed masking such that it works also if belief state has less keys then default state

parent 8cabb843
No related branches found
No related tags found
No related merge requests found
......@@ -259,11 +259,12 @@ class VectorBase(Vector):
if intent in ['nobook', 'nooffer'] and slot != 'none':
mask_list[i] = 1.0
if "book" in slot and intent == 'inform' and not self.state[domain][slot]:
if "book" in slot and intent == 'inform':
if not self.state.get(domain, {}).get(slot, {}):
mask_list[i] = 1.0
if domain == 'taxi':
if slot in self.state['taxi']:
if slot in self.state.get('taxi', {}):
if not self.state['taxi'][slot] and intent == 'inform':
mask_list[i] = 1.0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment