Datasets:
Update DiaBLa.py
Browse files
DiaBLa.py
CHANGED
@@ -66,9 +66,9 @@ class Diabla(datasets.GeneratorBasedBuilder):
|
|
66 |
'mt': datasets.Value('string'),
|
67 |
'ref': datasets.Value('string'),
|
68 |
'utterance_meta': {
|
69 |
-
'
|
70 |
-
'
|
71 |
-
'
|
72 |
datasets.Value("string")
|
73 |
],
|
74 |
'lang': datasets.Value("string")
|
@@ -121,9 +121,9 @@ class Diabla(datasets.GeneratorBasedBuilder):
|
|
121 |
'mt': datasets.Value('string'),
|
122 |
'ref': datasets.Value('string'),
|
123 |
'utterance_meta': {
|
124 |
-
'
|
125 |
-
'
|
126 |
-
'
|
127 |
datasets.Value("string")
|
128 |
],
|
129 |
'lang': datasets.Value("string"),
|
@@ -183,9 +183,9 @@ class Diabla(datasets.GeneratorBasedBuilder):
|
|
183 |
utterance = dialogue['utterances'][utterance_id]
|
184 |
# Meta-information attached to the utterance
|
185 |
utterance_info_keys = ['judgment', 'verbatim', 'problems']
|
186 |
-
utterance_info = {'
|
187 |
-
if utterance_info['
|
188 |
-
utterance_info['
|
189 |
utterance_info['lang'] = utterance['language']
|
190 |
# Utterance text
|
191 |
original_text = utterance['original_text']
|
|
|
66 |
'mt': datasets.Value('string'),
|
67 |
'ref': datasets.Value('string'),
|
68 |
'utterance_meta': {
|
69 |
+
'eval_judgment': datasets.Value("string"),
|
70 |
+
'eval_verbatim': datasets.Value('string'),
|
71 |
+
'eval_problems': [
|
72 |
datasets.Value("string")
|
73 |
],
|
74 |
'lang': datasets.Value("string")
|
|
|
121 |
'mt': datasets.Value('string'),
|
122 |
'ref': datasets.Value('string'),
|
123 |
'utterance_meta': {
|
124 |
+
'eval_judgment': datasets.Value("string"),
|
125 |
+
'eval_verbatim': datasets.Value("string"),
|
126 |
+
'eval_problems': [
|
127 |
datasets.Value("string")
|
128 |
],
|
129 |
'lang': datasets.Value("string"),
|
|
|
183 |
utterance = dialogue['utterances'][utterance_id]
|
184 |
# Meta-information attached to the utterance
|
185 |
utterance_info_keys = ['judgment', 'verbatim', 'problems']
|
186 |
+
utterance_info = {'eval_' + k: utterance['eval'][k] for k in utterance_info_keys}
|
187 |
+
if utterance_info['eval_judgment'] is None:
|
188 |
+
utterance_info['eval_judgment'] = ''
|
189 |
utterance_info['lang'] = utterance['language']
|
190 |
# Utterance text
|
191 |
original_text = utterance['original_text']
|