Skip to content
Snippets Groups Projects
Commit 823dda6d authored by zqwerty's avatar zqwerty
Browse files

rename goal:inform&request

parent c7c36a80
No related branches found
No related tags found
No related merge requests found
...@@ -78,8 +78,8 @@ We first introduce the unified format of `ontology` and `dialogues`. To transfor ...@@ -78,8 +78,8 @@ We first introduce the unified format of `ontology` and `dialogues`. To transfor
- `domains`: (*list*) involved domains in this dialogue. - `domains`: (*list*) involved domains in this dialogue.
- `goal`: (*dict*) - `goal`: (*dict*)
- `description`: (*str*, could be empty) a string describes the user goal. - `description`: (*str*, could be empty) a string describes the user goal.
- `constraints`: (*dict*, could be empty) same format as dialogue state of involved domains but with only filled slots as constraints. - `inform`: (*dict*, could be empty) same format as dialogue state of involved domains but with only filled slots as constraints.
- `requirements`: (*dict*, could be empty) same format as dialogue state of involved domains but with only empty required slots. - `request`: (*dict*, could be empty) same format as dialogue state of involved domains but with only empty requested slots.
- `turns`: (*list* of *dict*) - `turns`: (*list* of *dict*)
- `speaker`: (*str*) "user" or "system". - `speaker`: (*str*) "user" or "system".
- `utterance`: (*str*) - `utterance`: (*str*)
......
...@@ -162,16 +162,16 @@ def check_dialogues(name, dialogues, ontology): ...@@ -162,16 +162,16 @@ def check_dialogues(name, dialogues, ontology):
goal = dialogue['goal'] goal = dialogue['goal']
assert isinstance(goal['description'], str), f'{dialogue_id}\tgoal description {goal["description"]} should be string' assert isinstance(goal['description'], str), f'{dialogue_id}\tgoal description {goal["description"]} should be string'
assert isinstance(goal['constraints'], dict), f'{dialogue_id}\tgoal constraints {goal["constraints"]} should be dict' assert isinstance(goal['inform'], dict), f'{dialogue_id}\tgoal inform {goal["inform"]} should be dict'
assert isinstance(goal['requirements'], dict), f'{dialogue_id}\tgoal requirements {goal["requirements"]} should be dict' assert isinstance(goal['request'], dict), f'{dialogue_id}\tgoal request {goal["request"]} should be dict'
for domain_name, domain in goal['constraints'].items(): for domain_name, domain in goal['inform'].items():
for slot_name, value in domain.items(): for slot_name, value in domain.items():
check_dsv(domain_name, slot_name, value, prefix=f'{dialogue_id}:goal:constraints') check_dsv(domain_name, slot_name, value, prefix=f'{dialogue_id}:goal:inform')
assert value != "", f'{dialogue_id}\tshould set non-empty value in goal constraints {goal["constraints"]}' assert value != "", f'{dialogue_id}\tshould set non-empty value in goal inform {goal["inform"]}'
for domain_name, domain in goal['requirements'].items(): for domain_name, domain in goal['request'].items():
for slot_name, value in domain.items(): for slot_name, value in domain.items():
check_dsv(domain_name, slot_name, value, prefix=f'{dialogue_id}:goal:requirements') check_dsv(domain_name, slot_name, value, prefix=f'{dialogue_id}:goal:request')
assert value == "", f'{dialogue_id}\tshould set empty value in goal requirements {goal["requirements"]}' assert value == "", f'{dialogue_id}\tshould set empty value in goal request {goal["request"]}'
turns = dialogue['turns'] turns = dialogue['turns']
cur_stat['utterances'] += len(turns) cur_stat['utterances'] += len(turns)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment