Datasets:
Update DiaBLa.py
Browse files
DiaBLa.py
CHANGED
@@ -77,7 +77,27 @@ class Diabla(datasets.GeneratorBasedBuilder):
|
|
77 |
}
|
78 |
),
|
79 |
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
}
|
82 |
),
|
83 |
# TODO?
|
@@ -148,5 +168,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 |
-
|
152 |
yield id_, utterance_instance
|
|
|
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 |
),
|
103 |
# TODO?
|
|
|
168 |
# add to history (without dialogue info and history)
|
169 |
dialogue_history.append(utterance_instance.copy())
|
170 |
#utterance_instance['dialogue_meta'] = dialogue_info
|
171 |
+
utterance_instance['dialogue_history'] = dialogue_history
|
172 |
yield id_, utterance_instance
|