Update files from the datasets library (from 1.16.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.16.0
- dataset_infos.json +0 -0
- xtreme.py +20 -32
dataset_infos.json
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
xtreme.py
CHANGED
@@ -156,20 +156,20 @@ _PAN_X_LANG = [
|
|
156 |
|
157 |
_NAMES = ["XNLI", "tydiqa", "SQuAD"]
|
158 |
for lang in _PAN_X_LANG:
|
159 |
-
_NAMES.append("PAN-X.{}"
|
160 |
for lang1 in _MLQA_LANG:
|
161 |
for lang2 in _MLQA_LANG:
|
162 |
-
_NAMES.append("MLQA.{}.{}"
|
163 |
for lang in _XQUAD_LANG:
|
164 |
-
_NAMES.append("XQuAD.{}"
|
165 |
for lang in _BUCC_LANG:
|
166 |
-
_NAMES.append("bucc18.{}"
|
167 |
for lang in _PAWSX_LANG:
|
168 |
-
_NAMES.append("PAWS-X.{}"
|
169 |
for lang in _TATOEBA_LANG:
|
170 |
-
_NAMES.append("tatoeba.{}"
|
171 |
for lang in _UD_POS_LANG:
|
172 |
-
_NAMES.append("udpos.{}"
|
173 |
|
174 |
_DESCRIPTIONS = {
|
175 |
"tydiqa": textwrap.dedent(
|
@@ -405,7 +405,7 @@ _DATA_URLS = {
|
|
405 |
"MLQA": "https://dl.fbaipublicfiles.com/MLQA/MLQA_V1.zip",
|
406 |
"PAWS-X": "https://storage.googleapis.com/paws/pawsx/x-final.tar.gz",
|
407 |
"bucc18": "https://comparable.limsi.fr/bucc2018/",
|
408 |
-
"tatoeba": "https://github.com/facebookresearch/LASER/raw/
|
409 |
"udpos": "https://lindat.mff.cuni.cz/repository/xmlui/bitstream/handle/11234/1-3105/ud-treebanks-v2.5.tgz",
|
410 |
"SQuAD": "https://rajpurkar.github.io/SQuAD-explorer/dataset/",
|
411 |
"PAN-X": "https://s3.amazonaws.com/datasets.huggingface.co/wikiann/1.1.0/panx_dataset.zip",
|
@@ -418,7 +418,7 @@ _URLS = {
|
|
418 |
"MLQA": "https://github.com/facebookresearch/MLQA",
|
419 |
"PAWS-X": "https://github.com/google-research-datasets/paws/tree/master/pawsx",
|
420 |
"bucc18": "https://comparable.limsi.fr/bucc2018/",
|
421 |
-
"tatoeba": "https://github.com/facebookresearch/LASER/blob/
|
422 |
"udpos": "https://universaldependencies.org/",
|
423 |
"SQuAD": "https://rajpurkar.github.io/SQuAD-explorer/",
|
424 |
"PAN-X": "https://github.com/afshinrahimi/mmner",
|
@@ -553,8 +553,8 @@ class Xtreme(datasets.GeneratorBasedBuilder):
|
|
553 |
train_url = "v1.1/tydiqa-goldp-v1.1-train.json"
|
554 |
dev_url = "v1.1/tydiqa-goldp-v1.1-dev.json"
|
555 |
urls_to_download = {
|
556 |
-
"train":
|
557 |
-
"dev":
|
558 |
}
|
559 |
dl_dir = dl_manager.download_and_extract(urls_to_download)
|
560 |
return [
|
@@ -594,7 +594,7 @@ class Xtreme(datasets.GeneratorBasedBuilder):
|
|
594 |
gen_kwargs={
|
595 |
"filepath": os.path.join(
|
596 |
os.path.join(mlqa_downloaded_files, "MLQA_V1/test"),
|
597 |
-
"test-context-{}-question-{}.json"
|
598 |
)
|
599 |
},
|
600 |
),
|
@@ -604,7 +604,7 @@ class Xtreme(datasets.GeneratorBasedBuilder):
|
|
604 |
gen_kwargs={
|
605 |
"filepath": os.path.join(
|
606 |
os.path.join(mlqa_downloaded_files, "MLQA_V1/dev"),
|
607 |
-
"dev-context-{}-question-{}.json"
|
608 |
)
|
609 |
},
|
610 |
),
|
@@ -612,9 +612,7 @@ class Xtreme(datasets.GeneratorBasedBuilder):
|
|
612 |
|
613 |
if self.config.name.startswith("XQuAD"):
|
614 |
lang = self.config.name.split(".")[1]
|
615 |
-
xquad_downloaded_file = dl_manager.download_and_extract(
|
616 |
-
os.path.join(self.config.data_url, "xquad.{}.json".format(lang))
|
617 |
-
)
|
618 |
return [
|
619 |
datasets.SplitGenerator(
|
620 |
name=datasets.Split.VALIDATION,
|
@@ -650,12 +648,8 @@ class Xtreme(datasets.GeneratorBasedBuilder):
|
|
650 |
elif self.config.name.startswith("tatoeba"):
|
651 |
lang = self.config.name.split(".")[1]
|
652 |
|
653 |
-
tatoeba_source_data = dl_manager.download_and_extract(
|
654 |
-
|
655 |
-
)
|
656 |
-
tatoeba_eng_data = dl_manager.download_and_extract(
|
657 |
-
os.path.join(self.config.data_url, "tatoeba.{}-eng.eng".format(lang))
|
658 |
-
)
|
659 |
return [
|
660 |
datasets.SplitGenerator(
|
661 |
name=datasets.Split.VALIDATION,
|
@@ -666,16 +660,10 @@ class Xtreme(datasets.GeneratorBasedBuilder):
|
|
666 |
if self.config.name.startswith("bucc18"):
|
667 |
lang = self.config.name.split(".")[1]
|
668 |
bucc18_dl_test_dir = dl_manager.download_and_extract(
|
669 |
-
|
670 |
-
self.config.data_url,
|
671 |
-
"bucc2018-{}-en.training-gold.tar.bz2".format(lang),
|
672 |
-
)
|
673 |
)
|
674 |
bucc18_dl_dev_dir = dl_manager.download_and_extract(
|
675 |
-
|
676 |
-
self.config.data_url,
|
677 |
-
"bucc2018-{}-en.sample-gold.tar.bz2".format(lang),
|
678 |
-
)
|
679 |
)
|
680 |
return [
|
681 |
datasets.SplitGenerator(
|
@@ -783,8 +771,8 @@ class Xtreme(datasets.GeneratorBasedBuilder):
|
|
783 |
if self.config.name == "SQuAD":
|
784 |
|
785 |
urls_to_download = {
|
786 |
-
"train":
|
787 |
-
"dev":
|
788 |
}
|
789 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
790 |
|
|
|
156 |
|
157 |
_NAMES = ["XNLI", "tydiqa", "SQuAD"]
|
158 |
for lang in _PAN_X_LANG:
|
159 |
+
_NAMES.append(f"PAN-X.{lang}")
|
160 |
for lang1 in _MLQA_LANG:
|
161 |
for lang2 in _MLQA_LANG:
|
162 |
+
_NAMES.append(f"MLQA.{lang1}.{lang2}")
|
163 |
for lang in _XQUAD_LANG:
|
164 |
+
_NAMES.append(f"XQuAD.{lang}")
|
165 |
for lang in _BUCC_LANG:
|
166 |
+
_NAMES.append(f"bucc18.{lang}")
|
167 |
for lang in _PAWSX_LANG:
|
168 |
+
_NAMES.append(f"PAWS-X.{lang}")
|
169 |
for lang in _TATOEBA_LANG:
|
170 |
+
_NAMES.append(f"tatoeba.{lang}")
|
171 |
for lang in _UD_POS_LANG:
|
172 |
+
_NAMES.append(f"udpos.{lang}")
|
173 |
|
174 |
_DESCRIPTIONS = {
|
175 |
"tydiqa": textwrap.dedent(
|
|
|
405 |
"MLQA": "https://dl.fbaipublicfiles.com/MLQA/MLQA_V1.zip",
|
406 |
"PAWS-X": "https://storage.googleapis.com/paws/pawsx/x-final.tar.gz",
|
407 |
"bucc18": "https://comparable.limsi.fr/bucc2018/",
|
408 |
+
"tatoeba": "https://github.com/facebookresearch/LASER/raw/main/data/tatoeba/v1/",
|
409 |
"udpos": "https://lindat.mff.cuni.cz/repository/xmlui/bitstream/handle/11234/1-3105/ud-treebanks-v2.5.tgz",
|
410 |
"SQuAD": "https://rajpurkar.github.io/SQuAD-explorer/dataset/",
|
411 |
"PAN-X": "https://s3.amazonaws.com/datasets.huggingface.co/wikiann/1.1.0/panx_dataset.zip",
|
|
|
418 |
"MLQA": "https://github.com/facebookresearch/MLQA",
|
419 |
"PAWS-X": "https://github.com/google-research-datasets/paws/tree/master/pawsx",
|
420 |
"bucc18": "https://comparable.limsi.fr/bucc2018/",
|
421 |
+
"tatoeba": "https://github.com/facebookresearch/LASER/blob/main/data/tatoeba/v1/README.md",
|
422 |
"udpos": "https://universaldependencies.org/",
|
423 |
"SQuAD": "https://rajpurkar.github.io/SQuAD-explorer/",
|
424 |
"PAN-X": "https://github.com/afshinrahimi/mmner",
|
|
|
553 |
train_url = "v1.1/tydiqa-goldp-v1.1-train.json"
|
554 |
dev_url = "v1.1/tydiqa-goldp-v1.1-dev.json"
|
555 |
urls_to_download = {
|
556 |
+
"train": self.config.data_url + train_url,
|
557 |
+
"dev": self.config.data_url + dev_url,
|
558 |
}
|
559 |
dl_dir = dl_manager.download_and_extract(urls_to_download)
|
560 |
return [
|
|
|
594 |
gen_kwargs={
|
595 |
"filepath": os.path.join(
|
596 |
os.path.join(mlqa_downloaded_files, "MLQA_V1/test"),
|
597 |
+
f"test-context-{l1}-question-{l2}.json",
|
598 |
)
|
599 |
},
|
600 |
),
|
|
|
604 |
gen_kwargs={
|
605 |
"filepath": os.path.join(
|
606 |
os.path.join(mlqa_downloaded_files, "MLQA_V1/dev"),
|
607 |
+
f"dev-context-{l1}-question-{l2}.json",
|
608 |
)
|
609 |
},
|
610 |
),
|
|
|
612 |
|
613 |
if self.config.name.startswith("XQuAD"):
|
614 |
lang = self.config.name.split(".")[1]
|
615 |
+
xquad_downloaded_file = dl_manager.download_and_extract(self.config.data_url + f"xquad.{lang}.json")
|
|
|
|
|
616 |
return [
|
617 |
datasets.SplitGenerator(
|
618 |
name=datasets.Split.VALIDATION,
|
|
|
648 |
elif self.config.name.startswith("tatoeba"):
|
649 |
lang = self.config.name.split(".")[1]
|
650 |
|
651 |
+
tatoeba_source_data = dl_manager.download_and_extract(self.config.data_url + f"tatoeba.{lang}-eng.{lang}")
|
652 |
+
tatoeba_eng_data = dl_manager.download_and_extract(self.config.data_url + f"tatoeba.{lang}-eng.eng")
|
|
|
|
|
|
|
|
|
653 |
return [
|
654 |
datasets.SplitGenerator(
|
655 |
name=datasets.Split.VALIDATION,
|
|
|
660 |
if self.config.name.startswith("bucc18"):
|
661 |
lang = self.config.name.split(".")[1]
|
662 |
bucc18_dl_test_dir = dl_manager.download_and_extract(
|
663 |
+
self.config.data_url + f"bucc2018-{lang}-en.training-gold.tar.bz2"
|
|
|
|
|
|
|
664 |
)
|
665 |
bucc18_dl_dev_dir = dl_manager.download_and_extract(
|
666 |
+
self.config.data_url + f"bucc2018-{lang}-en.sample-gold.tar.bz2"
|
|
|
|
|
|
|
667 |
)
|
668 |
return [
|
669 |
datasets.SplitGenerator(
|
|
|
771 |
if self.config.name == "SQuAD":
|
772 |
|
773 |
urls_to_download = {
|
774 |
+
"train": self.config.data_url + "train-v1.1.json",
|
775 |
+
"dev": self.config.data_url + "dev-v1.1.json",
|
776 |
}
|
777 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
778 |
|