rbawden commited on
Commit
3ad179d
1 Parent(s): 6b284a4

Update DiaBLa.py

Browse files
Files changed (1) hide show
  1. DiaBLa.py +9 -9
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
- '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,9 +121,9 @@ class Diabla(datasets.GeneratorBasedBuilder):
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,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 = {'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']
 
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']