Update xquad_split.py
Browse files- xquad_split.py +9 -3
xquad_split.py
CHANGED
|
@@ -27,7 +27,7 @@ Greek, Russian, Turkish, Arabic, Vietnamese, Thai, Chinese, Hindi and Romanian.
|
|
| 27 |
across 12 languages.
|
| 28 |
"""
|
| 29 |
|
| 30 |
-
_URL = "https://github.com/summer1030/xquad-split
|
| 31 |
_LANG = ["th"]
|
| 32 |
_TRAIN_FILE = "train.json"
|
| 33 |
_VALID_FILE = "valid.json"
|
|
@@ -56,7 +56,7 @@ class Xquad(datasets.GeneratorBasedBuilder):
|
|
| 56 |
|
| 57 |
BUILDER_CONFIGS = [
|
| 58 |
XquadConfig(
|
| 59 |
-
name="xquad.th",
|
| 60 |
description=_DESCRIPTION,
|
| 61 |
),
|
| 62 |
]
|
|
@@ -100,7 +100,13 @@ class Xquad(datasets.GeneratorBasedBuilder):
|
|
| 100 |
# TODO(xquad): Downloads the data and defines the splits
|
| 101 |
# dl_manager is a datasets.download.DownloadManager that can be used to
|
| 102 |
# download and extract URLs
|
| 103 |
-
urls_to_download =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
| 105 |
|
| 106 |
return [
|
|
|
|
| 27 |
across 12 languages.
|
| 28 |
"""
|
| 29 |
|
| 30 |
+
_URL = "https://github.com/summer1030/xquad-split"
|
| 31 |
_LANG = ["th"]
|
| 32 |
_TRAIN_FILE = "train.json"
|
| 33 |
_VALID_FILE = "valid.json"
|
|
|
|
| 56 |
|
| 57 |
BUILDER_CONFIGS = [
|
| 58 |
XquadConfig(
|
| 59 |
+
name="xquad.th.split",
|
| 60 |
description=_DESCRIPTION,
|
| 61 |
),
|
| 62 |
]
|
|
|
|
| 100 |
# TODO(xquad): Downloads the data and defines the splits
|
| 101 |
# dl_manager is a datasets.download.DownloadManager that can be used to
|
| 102 |
# download and extract URLs
|
| 103 |
+
urls_to_download = _URL + self._TRAIN_FILE
|
| 104 |
+
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
| 105 |
+
|
| 106 |
+
urls_to_download = _URL + self._VALID_FILE
|
| 107 |
+
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
| 108 |
+
|
| 109 |
+
urls_to_download = _URL + self._TEST_FILE
|
| 110 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
| 111 |
|
| 112 |
return [
|