Datasets:
Update DiaBLa.py
Browse files
DiaBLa.py
CHANGED
@@ -160,10 +160,14 @@ class Diabla(datasets.GeneratorBasedBuilder):
|
|
160 |
dialogue_info_keys = ['start_time', 'end_time', 'scenario',
|
161 |
'user1', 'user2', 'translation_model',
|
162 |
'final_evaluation_user1', 'final_evaluation_user2']
|
|
|
163 |
for user in 'user1', 'user2':
|
164 |
-
|
|
|
165 |
if info_to_remove in dialogue[user]:
|
166 |
del dialogue[user][info_to_remove]
|
|
|
|
|
167 |
dialogue_info = {k: dialogue[k] for k in dialogue_info_keys}
|
168 |
if dialogue_info['end_time'] is None:
|
169 |
dialogue_info['end_time'] = ''
|
|
|
160 |
dialogue_info_keys = ['start_time', 'end_time', 'scenario',
|
161 |
'user1', 'user2', 'translation_model',
|
162 |
'final_evaluation_user1', 'final_evaluation_user2']
|
163 |
+
|
164 |
for user in 'user1', 'user2':
|
165 |
+
dialogue[user]['role_num'] = dialogue[user].get('role_num', dialogue[user]['rolenum'])
|
166 |
+
for info_to_remove in ['eval-stage', 'useragent', 'rolenum']:
|
167 |
if info_to_remove in dialogue[user]:
|
168 |
del dialogue[user][info_to_remove]
|
169 |
+
|
170 |
+
|
171 |
dialogue_info = {k: dialogue[k] for k in dialogue_info_keys}
|
172 |
if dialogue_info['end_time'] is None:
|
173 |
dialogue_info['end_time'] = ''
|