Datasets:
update
Browse files- SuperLim.py +27 -1
SuperLim.py
CHANGED
@@ -175,7 +175,13 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
175 |
features = datasets.Features(
|
176 |
{
|
177 |
"original sentence": datasets.Value("string"),
|
178 |
-
"corrected sentence": datasets.Value("string")
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
# These are the features of your dataset like images, labels ...
|
180 |
}
|
181 |
)
|
@@ -189,6 +195,14 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
189 |
"relation": datasets.Value("string"),
|
190 |
}
|
191 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
else: # This is an example to show how to have different features for "first_domain" and "second_domain"
|
193 |
features = datasets.Features(
|
194 |
{
|
@@ -278,6 +292,12 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
278 |
yield key, {
|
279 |
"original sentence": row["original sentence"],
|
280 |
"corrected sentence": row["corrected sentence"],
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
}
|
282 |
elif self.config.name == "sweana":
|
283 |
yield key, {
|
@@ -287,6 +307,12 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
287 |
"D": row["D"],
|
288 |
"relation": row["relation"],
|
289 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
290 |
else:
|
291 |
yield key, {
|
292 |
"sentence": data["sentence"],
|
|
|
175 |
features = datasets.Features(
|
176 |
{
|
177 |
"original sentence": datasets.Value("string"),
|
178 |
+
"corrected sentence": datasets.Value("string"),
|
179 |
+
"error indices": datasets.Value("string"),
|
180 |
+
"corrected indices": datasets.Value("string"),
|
181 |
+
"error-corr pair": datasets.Value("string"),
|
182 |
+
"error label": datasets.Value("string"),
|
183 |
+
"l1": datasets.Value("string"),
|
184 |
+
"approximate level": datasets.Value("string"),
|
185 |
# These are the features of your dataset like images, labels ...
|
186 |
}
|
187 |
)
|
|
|
195 |
"relation": datasets.Value("string"),
|
196 |
}
|
197 |
)
|
198 |
+
elif self.config.name == "swediag":
|
199 |
+
features = datasets.Features(
|
200 |
+
{
|
201 |
+
"Premise": datasets.Value("string"),
|
202 |
+
"Hypothesis": datasets.Value("string"),
|
203 |
+
"Label": datasets.Value("string"),
|
204 |
+
}
|
205 |
+
)
|
206 |
else: # This is an example to show how to have different features for "first_domain" and "second_domain"
|
207 |
features = datasets.Features(
|
208 |
{
|
|
|
292 |
yield key, {
|
293 |
"original sentence": row["original sentence"],
|
294 |
"corrected sentence": row["corrected sentence"],
|
295 |
+
"error indices": row["error indices"],
|
296 |
+
"corrected indices": row["corrected indices"],
|
297 |
+
"error-corr pair": row["error-corr pair"],
|
298 |
+
"error label": row["error label"],
|
299 |
+
"l1": row["l1"],
|
300 |
+
"approximate level": row["approximate level"],
|
301 |
}
|
302 |
elif self.config.name == "sweana":
|
303 |
yield key, {
|
|
|
307 |
"D": row["D"],
|
308 |
"relation": row["relation"],
|
309 |
}
|
310 |
+
elif self.config.name == "sweana":
|
311 |
+
yield key, {
|
312 |
+
"Premise": row["Premise_SE"],
|
313 |
+
"Hypothesis": row["Hypothesis_SE"],
|
314 |
+
"Label": row["Label"],
|
315 |
+
}
|
316 |
else:
|
317 |
yield key, {
|
318 |
"sentence": data["sentence"],
|