Datasets:
Update DiaBLa.py
Browse files
DiaBLa.py
CHANGED
@@ -172,7 +172,7 @@ class Diabla(datasets.GeneratorBasedBuilder):
|
|
172 |
if info_to_remove in dialogue[user]:
|
173 |
del dialogue[user][info_to_remove]
|
174 |
dialogue_info = {k: dialogue[k] for k in dialogue_info_keys}
|
175 |
-
if dialogue_info['end_time']
|
176 |
dialogue_info['end_time'] = ''
|
177 |
# Main data: the utterances
|
178 |
for utterance_id in dialogue['utterances']:
|
@@ -180,6 +180,8 @@ class Diabla(datasets.GeneratorBasedBuilder):
|
|
180 |
# Meta-information attached to the utterance
|
181 |
utterance_info_keys = ['judgment', 'verbatim', 'problems']
|
182 |
utterance_info = {'eval-' + k: utterance['eval'][k] for k in utterance_info_keys}
|
|
|
|
|
183 |
utterance_info['lang'] = utterance['language']
|
184 |
# Utterance text
|
185 |
original_text = utterance['original_text']
|
|
|
172 |
if info_to_remove in dialogue[user]:
|
173 |
del dialogue[user][info_to_remove]
|
174 |
dialogue_info = {k: dialogue[k] for k in dialogue_info_keys}
|
175 |
+
if dialogue_info['end_time'] is None:
|
176 |
dialogue_info['end_time'] = ''
|
177 |
# Main data: the utterances
|
178 |
for utterance_id in dialogue['utterances']:
|
|
|
180 |
# Meta-information attached to the utterance
|
181 |
utterance_info_keys = ['judgment', 'verbatim', 'problems']
|
182 |
utterance_info = {'eval-' + k: utterance['eval'][k] for k in utterance_info_keys}
|
183 |
+
if utterance_info['eval-judgment'] is None:
|
184 |
+
utterance_info['eval-judgment'] = ''
|
185 |
utterance_info['lang'] = utterance['language']
|
186 |
# Utterance text
|
187 |
original_text = utterance['original_text']
|