Felix
commited on
Commit
·
6c3740d
1
Parent(s):
3bcb3c1
swemnli -> swenli
Browse files
data/{swemnli/swemnli_dev.jsonl → swenli/swenli_dev.jsonl}
RENAMED
File without changes
|
data/{swemnli/swemnli_test.jsonl → swenli/swenli_test.jsonl}
RENAMED
File without changes
|
data/{swemnli/swemnli_train.jsonl → swenli/swenli_train.jsonl}
RENAMED
File without changes
|
superlim-2.py
CHANGED
@@ -68,7 +68,7 @@ _SweFaq_DESCRIPTION = """\
|
|
68 |
Vanliga frågor från svenska myndigheters webbsidor med svar i randomiserad ordning"""
|
69 |
_SweFaq_CITATION = """\
|
70 |
"""
|
71 |
-
|
72 |
A textual inference/entailment problem set, derived from FraCas. The original English Fracas [1] was converted to html and edited by Bill MacCartney [2],
|
73 |
and then automatically translated to Swedish by Peter Ljunglöf and Magdalena Siverbo [3]. The current tabular form of the set was created by Aleksandrs Berdicevskis
|
74 |
by merging the Swedish and English versions and removing some of the problems. Finally, Lars Borin went through all the translations, correcting and Swedifying them manually.
|
@@ -124,7 +124,7 @@ _TASKS = {
|
|
124 |
"swediagnostics": "swediagnostics",
|
125 |
"swedn": "swedn",
|
126 |
"swefaq": "swefaq",
|
127 |
-
"
|
128 |
"swepar": "sweparaphrase",
|
129 |
"swesat": "swesat-synonyms",
|
130 |
"swesim_relatedness": "supersim-superlim-relatedness",
|
@@ -175,7 +175,7 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
175 |
datasets.BuilderConfig(name="swediagnostics", version=VERSION, description=_SweDiag_DESCRIPTION),
|
176 |
datasets.BuilderConfig(name="swedn", version=VERSION, description=_SweDN_DESCRIPTION),
|
177 |
datasets.BuilderConfig(name="swefaq", version=VERSION, description=_SweFaq_DESCRIPTION),
|
178 |
-
datasets.BuilderConfig(name="
|
179 |
datasets.BuilderConfig(name="swepar", version=VERSION, description=_SwePar_DESCRIPTION),
|
180 |
datasets.BuilderConfig(name="swesat", version=VERSION, description=_SweSat_DESCRIPTION),
|
181 |
datasets.BuilderConfig(name="swesim_relatedness", version=VERSION, description=_SweSim_DESCRIPTION),
|
@@ -252,7 +252,7 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
252 |
"link": datasets.Value("string"),
|
253 |
})
|
254 |
})
|
255 |
-
elif self.config.name == '
|
256 |
features = datasets.Features({
|
257 |
"id": datasets.Value("string"),
|
258 |
"premise": datasets.Value("string"),
|
@@ -355,7 +355,7 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
355 |
},
|
356 |
)
|
357 |
splits.append(split_test)
|
358 |
-
if self.config.name in ("absabank-imm", "argumentation_sent", "dalaj-ged", "swefaq", "swewic", "
|
359 |
data_dir_dev = dl_manager.download_and_extract(os.path.join(_URL,DATA_FOLDER,f"{_TASKS[self.config.name]}_dev.{file_format}"))
|
360 |
split_dev = datasets.SplitGenerator(
|
361 |
name=datasets.Split.VALIDATION,
|
@@ -366,7 +366,7 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
366 |
)
|
367 |
splits.append(split_dev)
|
368 |
if self.config.name in ("absabank-imm", "argumentation_sent", "dalaj-ged", "swefaq",
|
369 |
-
"swewic", "
|
370 |
"swesim_similarity", "swesat", "sweana"):
|
371 |
data_dir_train = dl_manager.download_and_extract(os.path.join(_URL,DATA_FOLDER,f"{_TASKS[self.config.name]}_train.{file_format}"))
|
372 |
split_train = datasets.SplitGenerator(
|
@@ -435,7 +435,7 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
435 |
"label": row["label"],
|
436 |
"meta": row['meta'],
|
437 |
}
|
438 |
-
elif self.config.name == "
|
439 |
yield key, {
|
440 |
'id': row['id'],
|
441 |
'premise': row['premise'],
|
|
|
68 |
Vanliga frågor från svenska myndigheters webbsidor med svar i randomiserad ordning"""
|
69 |
_SweFaq_CITATION = """\
|
70 |
"""
|
71 |
+
_SweNLI_DESCRIPTION = """\
|
72 |
A textual inference/entailment problem set, derived from FraCas. The original English Fracas [1] was converted to html and edited by Bill MacCartney [2],
|
73 |
and then automatically translated to Swedish by Peter Ljunglöf and Magdalena Siverbo [3]. The current tabular form of the set was created by Aleksandrs Berdicevskis
|
74 |
by merging the Swedish and English versions and removing some of the problems. Finally, Lars Borin went through all the translations, correcting and Swedifying them manually.
|
|
|
124 |
"swediagnostics": "swediagnostics",
|
125 |
"swedn": "swedn",
|
126 |
"swefaq": "swefaq",
|
127 |
+
"swenli": "swenli",
|
128 |
"swepar": "sweparaphrase",
|
129 |
"swesat": "swesat-synonyms",
|
130 |
"swesim_relatedness": "supersim-superlim-relatedness",
|
|
|
175 |
datasets.BuilderConfig(name="swediagnostics", version=VERSION, description=_SweDiag_DESCRIPTION),
|
176 |
datasets.BuilderConfig(name="swedn", version=VERSION, description=_SweDN_DESCRIPTION),
|
177 |
datasets.BuilderConfig(name="swefaq", version=VERSION, description=_SweFaq_DESCRIPTION),
|
178 |
+
datasets.BuilderConfig(name="swenli", version=VERSION, description=_SweNLI_DESCRIPTION),
|
179 |
datasets.BuilderConfig(name="swepar", version=VERSION, description=_SwePar_DESCRIPTION),
|
180 |
datasets.BuilderConfig(name="swesat", version=VERSION, description=_SweSat_DESCRIPTION),
|
181 |
datasets.BuilderConfig(name="swesim_relatedness", version=VERSION, description=_SweSim_DESCRIPTION),
|
|
|
252 |
"link": datasets.Value("string"),
|
253 |
})
|
254 |
})
|
255 |
+
elif self.config.name == 'swenli':
|
256 |
features = datasets.Features({
|
257 |
"id": datasets.Value("string"),
|
258 |
"premise": datasets.Value("string"),
|
|
|
355 |
},
|
356 |
)
|
357 |
splits.append(split_test)
|
358 |
+
if self.config.name in ("absabank-imm", "argumentation_sent", "dalaj-ged", "swefaq", "swewic", "swenli", "swedn", "swepar"):
|
359 |
data_dir_dev = dl_manager.download_and_extract(os.path.join(_URL,DATA_FOLDER,f"{_TASKS[self.config.name]}_dev.{file_format}"))
|
360 |
split_dev = datasets.SplitGenerator(
|
361 |
name=datasets.Split.VALIDATION,
|
|
|
366 |
)
|
367 |
splits.append(split_dev)
|
368 |
if self.config.name in ("absabank-imm", "argumentation_sent", "dalaj-ged", "swefaq",
|
369 |
+
"swewic", "swenli", "swedn", "swepar", "swesim_relatedness",
|
370 |
"swesim_similarity", "swesat", "sweana"):
|
371 |
data_dir_train = dl_manager.download_and_extract(os.path.join(_URL,DATA_FOLDER,f"{_TASKS[self.config.name]}_train.{file_format}"))
|
372 |
split_train = datasets.SplitGenerator(
|
|
|
435 |
"label": row["label"],
|
436 |
"meta": row['meta'],
|
437 |
}
|
438 |
+
elif self.config.name == "swenli":
|
439 |
yield key, {
|
440 |
'id': row['id'],
|
441 |
'premise': row['premise'],
|