rbawden commited on
Commit
204dfe0
1 Parent(s): d874e0b

Update DiaBLa.py

Browse files
Files changed (1) hide show
  1. DiaBLa.py +26 -60
DiaBLa.py CHANGED
@@ -78,65 +78,31 @@ class Diabla(datasets.GeneratorBasedBuilder):
78
  'lang': datasets.Value("string"), # possible values = ['english', 'french']
79
  }
80
  ),
81
- 'dialogue_meta': datasets.features.Sequence(
82
- {
83
- 'start_time': datasets.Value('string'),
84
- 'end_time' : datasets.Value('string'),
85
- 'translation_model': datasets.Value('string'),
86
- 'final_evaluation_user1': datasets.features.Sequence(
87
- {
88
- 'style': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
89
- 'coherence': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
90
- 'grammaticality': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
91
- 'meaning': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
92
- 'word_choice': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
93
- }
94
- ),
95
- 'final_evaluation_user2': datasets.features.Sequence(
96
- {
97
- 'style': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
98
- 'coherence': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
99
- 'grammaticality': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
100
- 'meaning': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
101
- 'word_choice': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
102
- }
103
- ),
104
- 'scenario': datasets.features.Sequence(
105
- [
106
- [
107
- datasets.Value("string")
108
- ]
109
- ]
110
- ),
111
- 'user1': datasets.features.Sequence(
112
- {
113
- 'rolenum': datasets.Value('int64'),
114
- 'role': datasets.features.Sequence(
115
- [
116
- datasets.Value('string')
117
- ]
118
- ),
119
- 'initiated_dialogue': datasets.Value('bool'),
120
- 'turn_number': datasets.Value('int64'),
121
- 'lang': datasets.Value("string"), # possible values = ['english', 'french']
122
- }
123
- ),
124
- 'user2': datasets.features.Sequence(
125
- {
126
- 'rolenum': datasets.Value('int64'),
127
- 'role': datasets.features.Sequence(
128
- [
129
- datasets.Value('string')
130
- ]
131
- ),
132
- 'initiated_dialogue': datasets.Value('bool'),
133
- 'turn_number': datasets.Value('int64'),
134
- 'lang': datasets.Value("string"), # possible values = ['english', 'french']
135
- }
136
- )
137
- }
138
- ),
139
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  }
141
  ),
142
  # TODO?
@@ -206,6 +172,6 @@ class Diabla(datasets.GeneratorBasedBuilder):
206
 
207
  # add to history (without dialogue info and history)
208
  dialogue_history.append(utterance_instance.copy())
209
- utterance_instance['dialogue_meta'] = dialogue_info
210
- #utterance_instance['dialogue_history'] = dialogue_history
211
  yield id_, utterance_instance
 
78
  'lang': datasets.Value("string"), # possible values = ['english', 'french']
79
  }
80
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
 
82
+ 'dialogue_history': datasets.features.Sequence(
83
+ [
84
+ datasets.features.Sequence(
85
+ {
86
+ 'id': datasets.Value('string'),
87
+ 'orig': datasets.Value('string'),
88
+ 'norm': datasets.Value('string'),
89
+ 'mt': datasets.Value('string'),
90
+ 'ref': datasets.Value('string'),
91
+ 'utterance_meta': datasets.features.Sequence(
92
+ {
93
+ 'eval-judgment': datasets.Value("string"), # possible values = ['poor', 'medium', 'perfect']
94
+ 'eval-verbatim': datasets.Value("string"),
95
+ 'eval-problems': datasets.features.Sequence(
96
+ [
97
+ datasets.Value("string"), # possible values = ['coherence', 'grammar', 'meaning', 'word choice', 'style', 'other']
98
+ ]
99
+ ),
100
+ 'lang': datasets.Value("string"), # possible values = ['english', 'french']
101
+ }
102
+ ),
103
+ }),
104
+ ]
105
+ )
106
  }
107
  ),
108
  # TODO?
 
172
 
173
  # add to history (without dialogue info and history)
174
  dialogue_history.append(utterance_instance.copy())
175
+ #utterance_instance['dialogue_meta'] = dialogue_info
176
+ utterance_instance['dialogue_history'] = dialogue_history
177
  yield id_, utterance_instance