Datasets:
Tasks:
Question Answering
Modalities:
Text
Formats:
parquet
Sub-tasks:
open-domain-qa
Languages:
English
Size:
1K - 10K
License:
Commit
•
0e473cb
1
Parent(s):
9ee1d59
Convert dataset to Parquet (#3)
Browse files- Convert dataset to Parquet (85df600bc7c37156b56b755b224003dd2c7c35ac)
- Delete loading script (d5f9617ed0d73d679b253bc8d24cabb5817d0eb4)
- Delete legacy dataset_infos.json (7e5a4229dd90a54c63557b3e7cff9edd21d0101f)
- README.md +14 -7
- data/test-00000-of-00001.parquet +3 -0
- data/train-00000-of-00001.parquet +3 -0
- dataset_infos.json +0 -1
- web_questions.py +0 -98
README.md
CHANGED
@@ -1,15 +1,14 @@
|
|
1 |
---
|
2 |
annotations_creators:
|
3 |
- crowdsourced
|
4 |
-
language:
|
5 |
-
- en
|
6 |
language_creators:
|
7 |
- found
|
|
|
|
|
8 |
license:
|
9 |
- unknown
|
10 |
multilinguality:
|
11 |
- monolingual
|
12 |
-
pretty_name: WebQuestions
|
13 |
size_categories:
|
14 |
- 1K<n<10K
|
15 |
source_datasets:
|
@@ -19,6 +18,7 @@ task_categories:
|
|
19 |
task_ids:
|
20 |
- open-domain-qa
|
21 |
paperswithcode_id: webquestions
|
|
|
22 |
dataset_info:
|
23 |
features:
|
24 |
- name: url
|
@@ -29,13 +29,20 @@ dataset_info:
|
|
29 |
sequence: string
|
30 |
splits:
|
31 |
- name: train
|
32 |
-
num_bytes:
|
33 |
num_examples: 3778
|
34 |
- name: test
|
35 |
-
num_bytes:
|
36 |
num_examples: 2032
|
37 |
-
download_size:
|
38 |
-
dataset_size:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
---
|
40 |
|
41 |
# Dataset Card for "web_questions"
|
|
|
1 |
---
|
2 |
annotations_creators:
|
3 |
- crowdsourced
|
|
|
|
|
4 |
language_creators:
|
5 |
- found
|
6 |
+
language:
|
7 |
+
- en
|
8 |
license:
|
9 |
- unknown
|
10 |
multilinguality:
|
11 |
- monolingual
|
|
|
12 |
size_categories:
|
13 |
- 1K<n<10K
|
14 |
source_datasets:
|
|
|
18 |
task_ids:
|
19 |
- open-domain-qa
|
20 |
paperswithcode_id: webquestions
|
21 |
+
pretty_name: WebQuestions
|
22 |
dataset_info:
|
23 |
features:
|
24 |
- name: url
|
|
|
29 |
sequence: string
|
30 |
splits:
|
31 |
- name: train
|
32 |
+
num_bytes: 530711
|
33 |
num_examples: 3778
|
34 |
- name: test
|
35 |
+
num_bytes: 288184
|
36 |
num_examples: 2032
|
37 |
+
download_size: 402395
|
38 |
+
dataset_size: 818895
|
39 |
+
configs:
|
40 |
+
- config_name: default
|
41 |
+
data_files:
|
42 |
+
- split: train
|
43 |
+
path: data/train-*
|
44 |
+
- split: test
|
45 |
+
path: data/test-*
|
46 |
---
|
47 |
|
48 |
# Dataset Card for "web_questions"
|
data/test-00000-of-00001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3c81463f22162f645bdbdc0d501cfee9ad7d31bee819b3226f734523741c9faa
|
3 |
+
size 142239
|
data/train-00000-of-00001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7b59a32059d001919540ec617afb30d5c06829cbd3159e3da5f915bbd1d973bc
|
3 |
+
size 260156
|
dataset_infos.json
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"default": {"description": "This dataset consists of 6,642 question/answer pairs.\nThe questions are supposed to be answerable by Freebase, a large knowledge graph.\nThe questions are mostly centered around a single named entity.\nThe questions are popular ones asked on the web (at least in 2013).\n", "citation": "\n@inproceedings{berant-etal-2013-semantic,\n title = \"Semantic Parsing on {F}reebase from Question-Answer Pairs\",\n author = \"Berant, Jonathan and\n Chou, Andrew and\n Frostig, Roy and\n Liang, Percy\",\n booktitle = \"Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing\",\n month = oct,\n year = \"2013\",\n address = \"Seattle, Washington, USA\",\n publisher = \"Association for Computational Linguistics\",\n url = \"https://www.aclweb.org/anthology/D13-1160\",\n pages = \"1533--1544\",\n}\n", "homepage": "https://worksheets.codalab.org/worksheets/0xba659fe363cb46e7a505c5b6a774dc8a", "license": "", "features": {"url": {"dtype": "string", "id": null, "_type": "Value"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "answers": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "supervised_keys": null, "builder_name": "web_questions", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "datasets_version_to_prepare": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 533736, "num_examples": 3778, "dataset_name": "web_questions"}, "test": {"name": "test", "num_bytes": 289824, "num_examples": 2032, "dataset_name": "web_questions"}}, "download_checksums": {"https://worksheets.codalab.org/rest/bundles/0x4a763f8cde224c2da592b75f29e2f5c2/contents/blob/": {"num_bytes": 825320, "checksum": "fb1797e4554a1b1be642388367de1379f8c0d5afc609ac171492c67f7b70cb1e"}, "https://worksheets.codalab.org/rest/bundles/0xe7bac352fce7448c9ef238fb0a297ec2/contents/blob/": {"num_bytes": 447645, "checksum": "e3d4550e90660aaabe18458ba34b59f2624857273f375af7353273ce8b84ce6e"}}, "download_size": 1272965, "dataset_size": 823560, "size_in_bytes": 2096525}}
|
|
|
|
web_questions.py
DELETED
@@ -1,98 +0,0 @@
|
|
1 |
-
# coding=utf-8
|
2 |
-
# Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors.
|
3 |
-
#
|
4 |
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
5 |
-
# you may not use this file except in compliance with the License.
|
6 |
-
# You may obtain a copy of the License at
|
7 |
-
#
|
8 |
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9 |
-
#
|
10 |
-
# Unless required by applicable law or agreed to in writing, software
|
11 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
12 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
-
# See the License for the specific language governing permissions and
|
14 |
-
# limitations under the License.
|
15 |
-
|
16 |
-
# Lint as: python3
|
17 |
-
"""WebQuestions Benchmark for Question Answering."""
|
18 |
-
|
19 |
-
|
20 |
-
import json
|
21 |
-
import re
|
22 |
-
|
23 |
-
import datasets
|
24 |
-
|
25 |
-
|
26 |
-
_CITATION = """
|
27 |
-
@inproceedings{berant-etal-2013-semantic,
|
28 |
-
title = "Semantic Parsing on {F}reebase from Question-Answer Pairs",
|
29 |
-
author = "Berant, Jonathan and
|
30 |
-
Chou, Andrew and
|
31 |
-
Frostig, Roy and
|
32 |
-
Liang, Percy",
|
33 |
-
booktitle = "Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing",
|
34 |
-
month = oct,
|
35 |
-
year = "2013",
|
36 |
-
address = "Seattle, Washington, USA",
|
37 |
-
publisher = "Association for Computational Linguistics",
|
38 |
-
url = "https://www.aclweb.org/anthology/D13-1160",
|
39 |
-
pages = "1533--1544",
|
40 |
-
}
|
41 |
-
"""
|
42 |
-
_SPLIT_DOWNLOAD_URL = {
|
43 |
-
"train": "https://worksheets.codalab.org/rest/bundles/0x4a763f8cde224c2da592b75f29e2f5c2/contents/blob/",
|
44 |
-
"test": "https://worksheets.codalab.org/rest/bundles/0xe7bac352fce7448c9ef238fb0a297ec2/contents/blob/",
|
45 |
-
}
|
46 |
-
|
47 |
-
_DESCRIPTION = """\
|
48 |
-
This dataset consists of 6,642 question/answer pairs.
|
49 |
-
The questions are supposed to be answerable by Freebase, a large knowledge graph.
|
50 |
-
The questions are mostly centered around a single named entity.
|
51 |
-
The questions are popular ones asked on the web (at least in 2013).
|
52 |
-
"""
|
53 |
-
|
54 |
-
|
55 |
-
class WebQuestions(datasets.GeneratorBasedBuilder):
|
56 |
-
"""WebQuestions Benchmark for Question Answering."""
|
57 |
-
|
58 |
-
VERSION = datasets.Version("1.0.0")
|
59 |
-
|
60 |
-
def _info(self):
|
61 |
-
return datasets.DatasetInfo(
|
62 |
-
description=_DESCRIPTION,
|
63 |
-
features=datasets.Features(
|
64 |
-
{
|
65 |
-
"url": datasets.Value("string"),
|
66 |
-
"question": datasets.Value("string"),
|
67 |
-
"answers": datasets.features.Sequence(datasets.Value("string")),
|
68 |
-
}
|
69 |
-
),
|
70 |
-
supervised_keys=None,
|
71 |
-
homepage="https://worksheets.codalab.org/worksheets/0xba659fe363cb46e7a505c5b6a774dc8a",
|
72 |
-
citation=_CITATION,
|
73 |
-
)
|
74 |
-
|
75 |
-
def _split_generators(self, dl_manager):
|
76 |
-
"""Returns SplitGenerators."""
|
77 |
-
file_paths = dl_manager.download(_SPLIT_DOWNLOAD_URL)
|
78 |
-
|
79 |
-
return [
|
80 |
-
datasets.SplitGenerator(name=split, gen_kwargs={"file_path": file_path})
|
81 |
-
for split, file_path in file_paths.items()
|
82 |
-
]
|
83 |
-
|
84 |
-
def _generate_examples(self, file_path):
|
85 |
-
"""Parses split file and yields examples."""
|
86 |
-
|
87 |
-
def _target_to_answers(target):
|
88 |
-
target = re.sub(r"^\(list |\)$", "", target)
|
89 |
-
return ["".join(ans) for ans in re.findall(r'\(description (?:"([^"]+?)"|([^)]+?))\)\w*', target)]
|
90 |
-
|
91 |
-
with open(file_path, encoding="utf-8") as f:
|
92 |
-
examples = json.load(f)
|
93 |
-
for i, ex in enumerate(examples):
|
94 |
-
yield i, {
|
95 |
-
"url": ex["url"],
|
96 |
-
"question": ex["utterance"],
|
97 |
-
"answers": _target_to_answers(ex["targetValue"]),
|
98 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|