Skip to content
Snippets Groups Projects
Commit 37e9955a authored by zqwerty's avatar zqwerty
Browse files

small fix. slot=none or value=dontcare is OK, solve #177

parent 34960ff9
No related branches found
No related tags found
Loading
......@@ -56,7 +56,7 @@ class RuleDST(DST):
self.state['belief_state'][domain]['book'][k.lower()] = value
elif k == 'trainID' and domain == 'train':
self.state['belief_state'][domain]['book'][k] = normalize_value(self.value_dict, domain, k, value)
else:
elif k != 'none':
# raise Exception('unknown slot name <{}> of domain <{}>'.format(k, domain))
with open('unknown_slot.log', 'a+') as f:
f.write('unknown slot name <{}> of domain <{}>\n'.format(k, domain))
......
......@@ -77,6 +77,7 @@ def normalize_value(value_set, domain, slot, value):
v = special_match(domain, slot, value)
if v is not None:
return v
if v != 'dontcare':
_log(
'Failed: domain {} slot {} value {}, raw value returned.'.format(
domain,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment