Skip to content
Snippets Groups Projects
Commit c86fb226 authored by newRuntieException's avatar newRuntieException Committed by zhuqi
Browse files

update evaluator: check booked entity

parent 5779d158
No related branches found
No related tags found
No related merge requests found
......@@ -383,7 +383,13 @@ class MultiWozEvaluator(Evaluator):
if not query_result:
mismatch += 1
else:
if self.booked[domain] is not None and not self.database.query(domain, list(self.booked[domain].items())):
booked = self.booked[domain]
if booked is None:
match += 1
elif isinstance(booked, dict):
if all(booked.get(k, object()) == v for k, v in constraints):
match += 1
else:
mismatch += 1
else:
match += 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment