rbawden commited on
Commit
5a69e6f
1 Parent(s): f8a4844

Update DiaBLa.py

Browse files
Files changed (1) hide show
  1. DiaBLa.py +23 -2
DiaBLa.py CHANGED
@@ -77,7 +77,28 @@ class Diabla(datasets.GeneratorBasedBuilder):
77
  }
78
  ),
79
 
80
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  }
82
  ),
83
  # TODO?
@@ -148,5 +169,5 @@ class Diabla(datasets.GeneratorBasedBuilder):
148
  # add to history (without dialogue info and history)
149
  dialogue_history.append(utterance_instance.copy())
150
  #utterance_instance['dialogue_meta'] = dialogue_info
151
- #utterance_instance['dialogue_history'] = dialogue_history
152
  yield id_, utterance_instance
 
77
  }
78
  ),
79
 
80
+ 'dialogue_history': datasets.features.Sequence(
81
+ [
82
+ datasets.features.Sequence(
83
+ {
84
+ 'id': datasets.Value('string'),
85
+ 'orig': datasets.Value('string'),
86
+ 'norm': datasets.Value('string'),
87
+ 'mt': datasets.Value('string'),
88
+ 'ref': datasets.Value('string'),
89
+ 'utterance_meta': datasets.features.Sequence(
90
+ {
91
+ 'eval-judgment': datasets.Value("string"), # possible values = ['poor', 'medium', 'perfect']
92
+ 'eval-verbatim': datasets.Value("string"),
93
+ 'eval-problems': [
94
+ datasets.Value("string"), # possible values = ['coherence', 'grammar', 'meaning', 'word choice', 'style', 'other']
95
+ ]
96
+ 'lang': datasets.Value("string"), # possible values = ['english', 'french']
97
+ }
98
+ ),
99
+ }),
100
+ ]
101
+ )
102
  }
103
  ),
104
  # TODO?
 
169
  # add to history (without dialogue info and history)
170
  dialogue_history.append(utterance_instance.copy())
171
  #utterance_instance['dialogue_meta'] = dialogue_info
172
+ utterance_instance['dialogue_history'] = dialogue_history
173
  yield id_, utterance_instance