Update superlim-2.py
Browse files- superlim-2.py +18 -0
superlim-2.py
CHANGED
@@ -268,6 +268,16 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
268 |
"end_2": datasets.Value("string"),
|
269 |
}
|
270 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
else:
|
272 |
raise ValueError(f"Subset {self.config.name} does not exist.")
|
273 |
return datasets.DatasetInfo(
|
@@ -431,5 +441,13 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
431 |
"response_end":row["response_end"],
|
432 |
"label":row["label"]
|
433 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
434 |
else:
|
435 |
raise ValueError(f"Subset {self.config.name} does not exist")
|
|
|
268 |
"end_2": datasets.Value("string"),
|
269 |
}
|
270 |
)
|
271 |
+
|
272 |
+
elif self.config.name == 'argumentation_sent':
|
273 |
+
features = datasets.Features(
|
274 |
+
{
|
275 |
+
"topic": datasets.Value("string"),
|
276 |
+
"label": datasets.Value("string"),
|
277 |
+
"sentence": datasets.Value("string")
|
278 |
+
}
|
279 |
+
)
|
280 |
+
|
281 |
else:
|
282 |
raise ValueError(f"Subset {self.config.name} does not exist.")
|
283 |
return datasets.DatasetInfo(
|
|
|
441 |
"response_end":row["response_end"],
|
442 |
"label":row["label"]
|
443 |
}
|
444 |
+
|
445 |
+
elif self.config.name == "argumentation_sent":
|
446 |
+
yield key, {
|
447 |
+
"topic": row["topic"],
|
448 |
+
"label": row["label"],
|
449 |
+
"sentence" : row["sentence"]
|
450 |
+
}
|
451 |
+
|
452 |
else:
|
453 |
raise ValueError(f"Subset {self.config.name} does not exist")
|