Skip to content
Snippets Groups Projects
Commit e03d0155 authored by Carel van Niekerk's avatar Carel van Niekerk :computer:
Browse files

Update convlab/dst/setsumbt/dataset/unified_format.py

parent 0257dec2
No related branches found
No related tags found
No related merge requests found
...@@ -114,7 +114,7 @@ def convert_examples_to_features(data: list, ...@@ -114,7 +114,7 @@ def convert_examples_to_features(data: list,
# Create slot labels # Create slot labels
for domslot in tqdm(informable_slots): for domslot in tqdm(informable_slots):
labels = [] labels = []
for dial in tqdm(data): for dial in data:
labs = [] labs = []
for turn in dial: for turn in dial:
value = [v for d, substate in turn['state'].items() for s, v in substate.items() value = [v for d, substate in turn['state'].items() for s, v in substate.items()
...@@ -137,7 +137,7 @@ def convert_examples_to_features(data: list, ...@@ -137,7 +137,7 @@ def convert_examples_to_features(data: list,
# Create requestable slot labels # Create requestable slot labels
for domslot in tqdm(requestable_slots): for domslot in tqdm(requestable_slots):
labels = [] labels = []
for dial in tqdm(data): for dial in data:
labs = [] labs = []
for turn in dial: for turn in dial:
domain, slot = domslot.split('-', 1) domain, slot = domslot.split('-', 1)
...@@ -183,7 +183,7 @@ def convert_examples_to_features(data: list, ...@@ -183,7 +183,7 @@ def convert_examples_to_features(data: list,
# Create active domain labels # Create active domain labels
for domain in tqdm(domains): for domain in tqdm(domains):
labels = [] labels = []
for dial in tqdm(data): for dial in data:
labs = [] labs = []
for turn in dial: for turn in dial:
if domain in turn['active_domains']: if domain in turn['active_domains']:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment