Datasets:
Update DiaBLa.py
Browse files
DiaBLa.py
CHANGED
@@ -66,37 +66,72 @@ class Diabla(datasets.GeneratorBasedBuilder):
|
|
66 |
'norm': datasets.Value('string'),
|
67 |
'mt': datasets.Value('string'),
|
68 |
'ref': datasets.Value('string'),
|
69 |
-
'utterance_meta':
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
{
|
71 |
-
'
|
72 |
-
'
|
73 |
-
'
|
74 |
-
|
75 |
-
|
76 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
}
|
78 |
-
),
|
79 |
-
|
80 |
-
'dialogue_history': [
|
81 |
-
# datasets.features.Sequence(
|
82 |
-
{
|
83 |
-
'id': datasets.Value('string'),
|
84 |
-
'orig': datasets.Value('string'),
|
85 |
-
'norm': datasets.Value('string'),
|
86 |
-
'mt': datasets.Value('string'),
|
87 |
-
'ref': datasets.Value('string'),
|
88 |
-
'utterance_meta': datasets.features.Sequence(
|
89 |
-
{
|
90 |
-
'eval-judgment': datasets.Value("string"),
|
91 |
-
'eval-verbatim': datasets.Value("string"),
|
92 |
-
'eval-problems': [
|
93 |
-
datasets.Value("string")
|
94 |
-
],
|
95 |
-
'lang': datasets.Value("string"),
|
96 |
-
}
|
97 |
-
)
|
98 |
-
}
|
99 |
-
# )
|
100 |
]
|
101 |
}
|
102 |
),
|
@@ -167,6 +202,6 @@ class Diabla(datasets.GeneratorBasedBuilder):
|
|
167 |
|
168 |
# add to history (without dialogue info and history)
|
169 |
dialogue_history.append(utterance_instance.copy())
|
170 |
-
|
171 |
utterance_instance['dialogue_history'] = dialogue_history
|
172 |
yield id_, utterance_instance
|
|
|
66 |
'norm': datasets.Value('string'),
|
67 |
'mt': datasets.Value('string'),
|
68 |
'ref': datasets.Value('string'),
|
69 |
+
'utterance_meta': {
|
70 |
+
'eval-judgment': datasets.Value("string"),
|
71 |
+
'eval-verbatim': datasets.Value('string'),
|
72 |
+
'eval-problems': [
|
73 |
+
datasets.Value("string")
|
74 |
+
],
|
75 |
+
'lang': datasets.Value("string")
|
76 |
+
},
|
77 |
+
'dialogue_meta':
|
78 |
+
{
|
79 |
+
'start_time': datasets.Value('string'),
|
80 |
+
'end_time' : datasets.Value('string'),
|
81 |
+
'translation_model': datasets.Value('string'),
|
82 |
+
'final_evaluation_user1': {
|
83 |
+
'style': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
|
84 |
+
'coherence': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
|
85 |
+
'grammaticality': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
|
86 |
+
'meaning': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
|
87 |
+
'word_choice': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
|
88 |
+
},
|
89 |
+
'final_evaluation_user2': {
|
90 |
+
'style': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
|
91 |
+
'coherence': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
|
92 |
+
'grammaticality': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
|
93 |
+
'meaning': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
|
94 |
+
'word_choice': datasets.Value("string"), # possible values =['poor', 'average', 'good', 'excellent']
|
95 |
+
},
|
96 |
+
'scenario': [[
|
97 |
+
datasets.Value("string")
|
98 |
+
]],
|
99 |
+
'user1': {
|
100 |
+
'rolenum': datasets.Value('int64'),
|
101 |
+
'role':[
|
102 |
+
datasets.Value('string')
|
103 |
+
],
|
104 |
+
'initiated_dialogue': datasets.Value('bool'),
|
105 |
+
'turn_number': datasets.Value('int64'),
|
106 |
+
'lang': datasets.Value("string"), # possible values = ['english', 'french']
|
107 |
+
},
|
108 |
+
'user2':
|
109 |
+
{
|
110 |
+
'rolenum': datasets.Value('int64'),
|
111 |
+
'role':[
|
112 |
+
datasets.Value('string')
|
113 |
+
],
|
114 |
+
'initiated_dialogue': datasets.Value('bool'),
|
115 |
+
'turn_number': datasets.Value('int64'),
|
116 |
+
'lang': datasets.Value("string"), # possible values = ['english', 'french']
|
117 |
+
}
|
118 |
+
},
|
119 |
+
'dialogue_history': [
|
120 |
{
|
121 |
+
'id': datasets.Value('string'),
|
122 |
+
'orig': datasets.Value('string'),
|
123 |
+
'norm': datasets.Value('string'),
|
124 |
+
'mt': datasets.Value('string'),
|
125 |
+
'ref': datasets.Value('string'),
|
126 |
+
'utterance_meta': {
|
127 |
+
'eval-judgment': datasets.Value("string"),
|
128 |
+
'eval-verbatim': datasets.Value("string"),
|
129 |
+
'eval-problems': [
|
130 |
+
datasets.Value("string")
|
131 |
+
],
|
132 |
+
'lang': datasets.Value("string"),
|
133 |
+
}
|
134 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
]
|
136 |
}
|
137 |
),
|
|
|
202 |
|
203 |
# add to history (without dialogue info and history)
|
204 |
dialogue_history.append(utterance_instance.copy())
|
205 |
+
utterance_instance['dialogue_meta'] = dialogue_info
|
206 |
utterance_instance['dialogue_history'] = dialogue_history
|
207 |
yield id_, utterance_instance
|