Felix
commited on
Commit
·
4ab2261
1
Parent(s):
0ffaa3c
remove swefracas and add swemnli
Browse files- data/swemnli/swemnli_dev.jsonl +3 -0
- data/swemnli/swemnli_test.jsonl +3 -0
- data/swemnli/swemnli_train.jsonl +3 -0
- superlim-2.py +14 -13
data/swemnli/swemnli_dev.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7a09e1ccebab854a33b9d182193e456fe4ecf69fe24f791e173ba621823fc85f
|
| 3 |
+
size 2362732
|
data/swemnli/swemnli_test.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:232a35144b8c6a13b71e08be5622faeb8c955b43a7dc9572784f9ea66464061a
|
| 3 |
+
size 54611
|
data/swemnli/swemnli_train.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d701f7d8e1e214cddb10399db415e00454994662e135a32bf6aaa96dadf4e3e1
|
| 3 |
+
size 96150107
|
superlim-2.py
CHANGED
|
@@ -65,7 +65,7 @@ _SweFaq_DESCRIPTION = """\
|
|
| 65 |
Vanliga frågor från svenska myndigheters webbsidor med svar i randomiserad ordning"""
|
| 66 |
_SweFaq_CITATION = """\
|
| 67 |
"""
|
| 68 |
-
|
| 69 |
A textual inference/entailment problem set, derived from FraCas. The original English Fracas [1] was converted to html and edited by Bill MacCartney [2],
|
| 70 |
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
|
| 71 |
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.
|
|
@@ -123,9 +123,9 @@ _TASKS = {
|
|
| 123 |
"swefaq": "swefaq",
|
| 124 |
"swepar": "sweparaphrase",
|
| 125 |
"swesat": "swesat-synonyms",
|
|
|
|
| 126 |
"swewic": "swewic",
|
| 127 |
"swedn": "swedn",
|
| 128 |
-
"swefracas": "swefracas",
|
| 129 |
"swediagnostics": "swediagnostics"
|
| 130 |
}
|
| 131 |
|
|
@@ -176,7 +176,7 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
| 176 |
datasets.BuilderConfig(name="swedn", version=VERSION, description=_SweDN_DESCRIPTION),
|
| 177 |
datasets.BuilderConfig(name="swewic", version=VERSION, description=_SweWic_DESCRIPTION),
|
| 178 |
datasets.BuilderConfig(name="argumentation_sent", version=VERSION, description=_argumentation_sentences_DESCRIPTION),
|
| 179 |
-
datasets.BuilderConfig(name="
|
| 180 |
datasets.BuilderConfig(name="swediagnostics", version=VERSION, description=_SweDiag_DESCRIPTION)
|
| 181 |
]
|
| 182 |
|
|
@@ -272,13 +272,13 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
| 272 |
"sentence": datasets.Value("string")
|
| 273 |
}
|
| 274 |
)
|
| 275 |
-
elif self.config.name == '
|
| 276 |
features = datasets.Features(
|
| 277 |
{
|
| 278 |
"id": datasets.Value("string"),
|
| 279 |
-
"
|
| 280 |
-
"
|
| 281 |
-
"
|
| 282 |
}
|
| 283 |
)
|
| 284 |
elif self.config.name == 'swediagnostics':
|
|
@@ -335,7 +335,7 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
| 335 |
},
|
| 336 |
)
|
| 337 |
splits.append(split_test)
|
| 338 |
-
if self.config.name in ("absabank-imm", "dalaj-ged", "swefaq", "swewic", "swedn", "swepar"):
|
| 339 |
data_dir_dev = dl_manager.download_and_extract(os.path.join(_URL,DATA_FOLDER,f"{_TASKS[self.config.name]}_dev.{file_format}"))
|
| 340 |
split_dev = datasets.SplitGenerator(
|
| 341 |
name=datasets.Split.VALIDATION,
|
|
@@ -345,7 +345,7 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
| 345 |
},
|
| 346 |
)
|
| 347 |
splits.append(split_dev)
|
| 348 |
-
if self.config.name in ("absabank-imm", "dalaj-ged", "swefaq", "swewic", "argumentation_sent", "swedn", "swepar"):
|
| 349 |
data_dir_train = dl_manager.download_and_extract(os.path.join(_URL,DATA_FOLDER,f"{_TASKS[self.config.name]}_train.{file_format}"))
|
| 350 |
split_train = datasets.SplitGenerator(
|
| 351 |
name=datasets.Split.TRAIN,
|
|
@@ -464,11 +464,12 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
| 464 |
'label': row['label']
|
| 465 |
}
|
| 466 |
|
| 467 |
-
elif self.config.name == "
|
| 468 |
yield key, {
|
| 469 |
-
'
|
| 470 |
-
'
|
| 471 |
-
'
|
|
|
|
| 472 |
}
|
| 473 |
|
| 474 |
elif self.config.name == "swedn":
|
|
|
|
| 65 |
Vanliga frågor från svenska myndigheters webbsidor med svar i randomiserad ordning"""
|
| 66 |
_SweFaq_CITATION = """\
|
| 67 |
"""
|
| 68 |
+
_SweMNLI_DESCRIPTION = """\
|
| 69 |
A textual inference/entailment problem set, derived from FraCas. The original English Fracas [1] was converted to html and edited by Bill MacCartney [2],
|
| 70 |
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
|
| 71 |
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.
|
|
|
|
| 123 |
"swefaq": "swefaq",
|
| 124 |
"swepar": "sweparaphrase",
|
| 125 |
"swesat": "swesat-synonyms",
|
| 126 |
+
"swemnli": "swemnli",
|
| 127 |
"swewic": "swewic",
|
| 128 |
"swedn": "swedn",
|
|
|
|
| 129 |
"swediagnostics": "swediagnostics"
|
| 130 |
}
|
| 131 |
|
|
|
|
| 176 |
datasets.BuilderConfig(name="swedn", version=VERSION, description=_SweDN_DESCRIPTION),
|
| 177 |
datasets.BuilderConfig(name="swewic", version=VERSION, description=_SweWic_DESCRIPTION),
|
| 178 |
datasets.BuilderConfig(name="argumentation_sent", version=VERSION, description=_argumentation_sentences_DESCRIPTION),
|
| 179 |
+
datasets.BuilderConfig(name="swemnli", version=VERSION, description=_SweMNLI_DESCRIPTION),
|
| 180 |
datasets.BuilderConfig(name="swediagnostics", version=VERSION, description=_SweDiag_DESCRIPTION)
|
| 181 |
]
|
| 182 |
|
|
|
|
| 272 |
"sentence": datasets.Value("string")
|
| 273 |
}
|
| 274 |
)
|
| 275 |
+
elif self.config.name == 'swemnli':
|
| 276 |
features = datasets.Features(
|
| 277 |
{
|
| 278 |
"id": datasets.Value("string"),
|
| 279 |
+
"premise": datasets.Value("string"),
|
| 280 |
+
"hypothesis": datasets.Value("string"),
|
| 281 |
+
"label": datasets.Value("string")
|
| 282 |
}
|
| 283 |
)
|
| 284 |
elif self.config.name == 'swediagnostics':
|
|
|
|
| 335 |
},
|
| 336 |
)
|
| 337 |
splits.append(split_test)
|
| 338 |
+
if self.config.name in ("absabank-imm", "dalaj-ged", "swefaq", "swewic", "swemnli", "swedn", "swepar"):
|
| 339 |
data_dir_dev = dl_manager.download_and_extract(os.path.join(_URL,DATA_FOLDER,f"{_TASKS[self.config.name]}_dev.{file_format}"))
|
| 340 |
split_dev = datasets.SplitGenerator(
|
| 341 |
name=datasets.Split.VALIDATION,
|
|
|
|
| 345 |
},
|
| 346 |
)
|
| 347 |
splits.append(split_dev)
|
| 348 |
+
if self.config.name in ("absabank-imm", "dalaj-ged", "swefaq", "swewic", "swemnli", "argumentation_sent", "swedn", "swepar"):
|
| 349 |
data_dir_train = dl_manager.download_and_extract(os.path.join(_URL,DATA_FOLDER,f"{_TASKS[self.config.name]}_train.{file_format}"))
|
| 350 |
split_train = datasets.SplitGenerator(
|
| 351 |
name=datasets.Split.TRAIN,
|
|
|
|
| 464 |
'label': row['label']
|
| 465 |
}
|
| 466 |
|
| 467 |
+
elif self.config.name == "swemnli":
|
| 468 |
yield key, {
|
| 469 |
+
'id': row['id'],
|
| 470 |
+
'premise': row['premise'],
|
| 471 |
+
'hypothesis': row['hypothesis'],
|
| 472 |
+
'label': row['label']
|
| 473 |
}
|
| 474 |
|
| 475 |
elif self.config.name == "swedn":
|