Update files from the datasets library (from 1.2.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.2.0
com_qa.py
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
from __future__ import absolute_import, division, print_function
|
4 |
|
5 |
import json
|
6 |
-
import os
|
7 |
|
8 |
import datasets
|
9 |
|
@@ -40,10 +39,13 @@ in ComQA are grouped into 4,834 paraphrase clusters that express the same inform
|
|
40 |
with its answer(s). ComQA answers come in the form of Wikipedia entities wherever possible. Wherever the answers are
|
41 |
temporal or measurable quantities, TIMEX3 and the International System of Units (SI) are used for normalization.
|
42 |
"""
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
47 |
|
48 |
|
49 |
class ComQa(datasets.GeneratorBasedBuilder):
|
@@ -80,11 +82,7 @@ class ComQa(datasets.GeneratorBasedBuilder):
|
|
80 |
# TODO(com_qa): Downloads the data and defines the splits
|
81 |
# dl_manager is a datasets.download.DownloadManager that can be used to
|
82 |
# download and extract URLs
|
83 |
-
urls_to_download =
|
84 |
-
"train": os.path.join(_URL, _TRAIN_FILE),
|
85 |
-
"dev": os.path.join(_URL, _DEV_FILE),
|
86 |
-
"test": os.path.join(_URL, _TEST_FILE),
|
87 |
-
}
|
88 |
dl_dir = dl_manager.download_and_extract(urls_to_download)
|
89 |
return [
|
90 |
datasets.SplitGenerator(
|
|
|
3 |
from __future__ import absolute_import, division, print_function
|
4 |
|
5 |
import json
|
|
|
6 |
|
7 |
import datasets
|
8 |
|
|
|
39 |
with its answer(s). ComQA answers come in the form of Wikipedia entities wherever possible. Wherever the answers are
|
40 |
temporal or measurable quantities, TIMEX3 and the International System of Units (SI) are used for normalization.
|
41 |
"""
|
42 |
+
|
43 |
+
_URL = "https://qa.mpi-inf.mpg.de/comqa/"
|
44 |
+
_URLS = {
|
45 |
+
"train": _URL + "comqa_train.json",
|
46 |
+
"dev": _URL + "comqa_dev.json",
|
47 |
+
"test": _URL + "comqa_test.json",
|
48 |
+
}
|
49 |
|
50 |
|
51 |
class ComQa(datasets.GeneratorBasedBuilder):
|
|
|
82 |
# TODO(com_qa): Downloads the data and defines the splits
|
83 |
# dl_manager is a datasets.download.DownloadManager that can be used to
|
84 |
# download and extract URLs
|
85 |
+
urls_to_download = _URLS
|
|
|
|
|
|
|
|
|
86 |
dl_dir = dl_manager.download_and_extract(urls_to_download)
|
87 |
return [
|
88 |
datasets.SplitGenerator(
|