Skip to content

Commit

Permalink
Merge pull request #60 from google-research-datasets/sgdx-intent-bug
Browse files Browse the repository at this point in the history
Process "intent" field as an Intent if Act indicates it is an Intent
  • Loading branch information
harjlee authored Aug 7, 2023
2 parents a13fa14 + 5b70bb8 commit e852981
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sgd_x/generate_sgdx_dialogues.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ def create_modified_dialogues(
for action in frame.get('actions', []):
# Replace values if slot is intent.
if 'slot' in action:
if action['slot'] == 'intent':
if (
action['slot'] == 'intent'
# Don't process the slot named "intent" from Homes service.
and action['act'] in ['OFFER_INTENT', 'INFORM_INTENT']
):
utils.replace_list_elements_with_mapping(
action.get('canonical_values', []), intent_to_name)
utils.replace_list_elements_with_mapping(
Expand Down

0 comments on commit e852981

Please sign in to comment.