Datasets:
Tasks:
Question Answering
Modalities:
Text
Formats:
parquet
Sub-tasks:
extractive-qa
Size:
100K - 1M
License:
Update files from the datasets library (from 1.2.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.2.0
tydiqa.py
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
from __future__ import absolute_import, division, print_function
|
4 |
|
5 |
import json
|
6 |
-
import os
|
7 |
import textwrap
|
8 |
|
9 |
import datasets
|
@@ -29,11 +28,16 @@ information-seeking task and avoid priming effects, questions are written by peo
|
|
29 |
don’t know the answer yet, (unlike SQuAD and its descendents) and the data is collected directly in each language without
|
30 |
the use of translation (unlike MLQA and XQuAD).
|
31 |
"""
|
|
|
32 |
_URL = "https://storage.googleapis.com/tydiqa/"
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
|
|
37 |
|
38 |
|
39 |
class TydiqaConfig(datasets.BuilderConfig):
|
@@ -155,16 +159,8 @@ class Tydiqa(datasets.GeneratorBasedBuilder):
|
|
155 |
# TODO(tydiqa): Downloads the data and defines the splits
|
156 |
# dl_manager is a datasets.download.DownloadManager that can be used to
|
157 |
# download and extract URLs
|
158 |
-
|
159 |
-
|
160 |
-
"dev": os.path.join(_URL, _PRIMARY_TASK_DEV),
|
161 |
-
}
|
162 |
-
secondary_urls_to_download = {
|
163 |
-
"train": os.path.join(_URL, _SECONDARY_TASK_TRAIN),
|
164 |
-
"dev": os.path.join(_URL, _SECONDARY_TASK_DEV),
|
165 |
-
}
|
166 |
-
primary_downloaded = dl_manager.download_and_extract(primary_urls_to_download)
|
167 |
-
secondary_downloaded = dl_manager.download_and_extract(secondary_urls_to_download)
|
168 |
if self.config.name == "primary_task":
|
169 |
return [
|
170 |
datasets.SplitGenerator(
|
|
|
3 |
from __future__ import absolute_import, division, print_function
|
4 |
|
5 |
import json
|
|
|
6 |
import textwrap
|
7 |
|
8 |
import datasets
|
|
|
28 |
don’t know the answer yet, (unlike SQuAD and its descendents) and the data is collected directly in each language without
|
29 |
the use of translation (unlike MLQA and XQuAD).
|
30 |
"""
|
31 |
+
|
32 |
_URL = "https://storage.googleapis.com/tydiqa/"
|
33 |
+
_PRIMARY_URLS = {
|
34 |
+
"train": _URL + "v1.0/tydiqa-v1.0-train.jsonl.gz",
|
35 |
+
"dev": _URL + "v1.0/tydiqa-v1.0-dev.jsonl.gz",
|
36 |
+
}
|
37 |
+
_SECONDARY_URLS = {
|
38 |
+
"train": _URL + "v1.1/tydiqa-goldp-v1.1-train.json",
|
39 |
+
"dev": _URL + "v1.1/tydiqa-goldp-v1.1-dev.json",
|
40 |
+
}
|
41 |
|
42 |
|
43 |
class TydiqaConfig(datasets.BuilderConfig):
|
|
|
159 |
# TODO(tydiqa): Downloads the data and defines the splits
|
160 |
# dl_manager is a datasets.download.DownloadManager that can be used to
|
161 |
# download and extract URLs
|
162 |
+
primary_downloaded = dl_manager.download_and_extract(_PRIMARY_URLS)
|
163 |
+
secondary_downloaded = dl_manager.download_and_extract(_SECONDARY_URLS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
if self.config.name == "primary_task":
|
165 |
return [
|
166 |
datasets.SplitGenerator(
|