Datasets:

Languages:
English
Multilinguality:
monolingual
Size Categories:
10K<n<100K
Language Creators:
other
Annotations Creators:
expert-generated
Tags:
License:
albertvillanova HF staff commited on
Commit
3e24b5c
1 Parent(s): d678e70

Convert dataset to Parquet (#2)

Browse files

- Convert dataset to Parquet (45387653c32c077fa3e5a6d4ff58515350c66064)
- Delete loading script (cf6630c5f2a68564959d4f0faf77e036a2855243)
- Delete legacy dataset_infos.json (e39c308628d3ce427ffdbdef1230755093021ab6)

README.md CHANGED
@@ -9,7 +9,6 @@ license:
9
  - cc-by-sa-3.0
10
  multilinguality:
11
  - monolingual
12
- pretty_name: NQ-Open
13
  size_categories:
14
  - 10K<n<100K
15
  source_datasets:
@@ -18,23 +17,31 @@ task_categories:
18
  - question-answering
19
  task_ids:
20
  - open-domain-qa
21
- paperswithcode_id: null
22
  dataset_info:
 
23
  features:
24
  - name: question
25
  dtype: string
26
  - name: answer
27
  sequence: string
28
- config_name: nq_open
29
  splits:
30
  - name: train
31
- num_bytes: 6651344
32
  num_examples: 87925
33
  - name: validation
34
- num_bytes: 313841
35
  num_examples: 3610
36
- download_size: 8913614
37
- dataset_size: 6965185
 
 
 
 
 
 
 
 
38
  ---
39
 
40
  # Dataset Card for nq_open
9
  - cc-by-sa-3.0
10
  multilinguality:
11
  - monolingual
 
12
  size_categories:
13
  - 10K<n<100K
14
  source_datasets:
17
  - question-answering
18
  task_ids:
19
  - open-domain-qa
20
+ pretty_name: NQ-Open
21
  dataset_info:
22
+ config_name: nq_open
23
  features:
24
  - name: question
25
  dtype: string
26
  - name: answer
27
  sequence: string
 
28
  splits:
29
  - name: train
30
+ num_bytes: 6651236
31
  num_examples: 87925
32
  - name: validation
33
+ num_bytes: 313829
34
  num_examples: 3610
35
+ download_size: 4678245
36
+ dataset_size: 6965065
37
+ configs:
38
+ - config_name: nq_open
39
+ data_files:
40
+ - split: train
41
+ path: nq_open/train-*
42
+ - split: validation
43
+ path: nq_open/validation-*
44
+ default: true
45
  ---
46
 
47
  # Dataset Card for nq_open
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"nq_open": {"description": "The NQ-Open task, introduced by Lee et.al. 2019,\nis an open domain question answering benchmark that is derived from Natural Questions.\nThe goal is to predict an English answer string for an input English question.\nAll questions can be answered using the contents of English Wikipedia.\n", "citation": "@article{doi:10.1162/tacl_a_00276,\n author = {Kwiatkowski, Tom and Palomaki, Jennimaria and Redfield, Olivia and Collins, Michael and Parikh, Ankur and Alberti, Chris and Epstein, Danielle and Polosukhin, Illia and Devlin, Jacob and Lee, Kenton and Toutanova, Kristina and Jones, Llion and Kelcey, Matthew and Chang, Ming-Wei and Dai, Andrew M. and Uszkoreit, Jakob and Le, Quoc and Petrov, Slav},\n title = {Natural Questions: A Benchmark for Question Answering Research},\n journal = {Transactions of the Association for Computational Linguistics},\n volume = {7},\n number = {},\n pages = {453-466},\n year = {2019},\n doi = {10.1162/tacl_a_00276},\n URL = {\n https://doi.org/10.1162/tacl_a_00276\n },\n eprint = {\n https://doi.org/10.1162/tacl_a_00276\n },\n abstract = { We present the Natural Questions corpus, a question answering data set. Questions consist of real anonymized, aggregated queries issued to the Google search engine. An annotator is presented with a question along with a Wikipedia page from the top 5 search results, and annotates a long answer (typically a paragraph) and a short answer (one or more entities) if present on the page, or marks null if no long/short answer is present. The public release consists of 307,373 training examples with single annotations; 7,830 examples with 5-way annotations for development data; and a further 7,842 examples with 5-way annotated sequestered as test data. We present experiments validating quality of the data. We also describe analysis of 25-way annotations on 302 examples, giving insights into human variability on the annotation task. We introduce robust metrics for the purposes of evaluating question answering systems; demonstrate high human upper bounds on these metrics; and establish baseline results using competitive methods drawn from related literature. }\n}\n\n@inproceedings{lee-etal-2019-latent,\n title = \"Latent Retrieval for Weakly Supervised Open Domain Question Answering\",\n author = \"Lee, Kenton and\n Chang, Ming-Wei and\n Toutanova, Kristina\",\n booktitle = \"Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics\",\n month = jul,\n year = \"2019\",\n address = \"Florence, Italy\",\n publisher = \"Association for Computational Linguistics\",\n url = \"https://www.aclweb.org/anthology/P19-1612\",\n doi = \"10.18653/v1/P19-1612\",\n pages = \"6086--6096\",\n abstract = \"Recent work on open domain question answering (QA) assumes strong supervision of the supporting evidence and/or assumes a blackbox information retrieval (IR) system to retrieve evidence candidates. We argue that both are suboptimal, since gold evidence is not always available, and QA is fundamentally different from IR. We show for the first time that it is possible to jointly learn the retriever and reader from question-answer string pairs and without any IR system. In this setting, evidence retrieval from all of Wikipedia is treated as a latent variable. Since this is impractical to learn from scratch, we pre-train the retriever with an Inverse Cloze Task. We evaluate on open versions of five QA datasets. On datasets where the questioner already knows the answer, a traditional IR system such as BM25 is sufficient. On datasets where a user is genuinely seeking an answer, we show that learned retrieval is crucial, outperforming BM25 by up to 19 points in exact match.\",\n}\n", "homepage": "https://efficientqa.github.io/", "license": "", "features": {"question": {"dtype": "string", "id": null, "_type": "Value"}, "answer": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "nq_open", "config_name": "nq_open", "version": {"version_str": "2.0.0", "description": "", "major": 2, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 6651344, "num_examples": 87925, "dataset_name": "nq_open"}, "validation": {"name": "validation", "num_bytes": 313841, "num_examples": 3610, "dataset_name": "nq_open"}}, "download_checksums": {"https://raw.githubusercontent.com/google-research-datasets/natural-questions/master/nq_open/NQ-open.dev.jsonl": {"num_bytes": 391316, "checksum": "f15567f38099f3615f5b8a685c0aef449c11ad90d3da3735e8d1b98115b40616"}, "https://raw.githubusercontent.com/google-research-datasets/natural-questions/master/nq_open/NQ-open.train.jsonl": {"num_bytes": 8522298, "checksum": "0c93aaf13b12f855628489665e4ef85ffb8573ad444646f11f4fabdc57a0aabf"}}, "download_size": 8913614, "post_processing_size": null, "dataset_size": 6965185, "size_in_bytes": 15878799}}
 
nq_open.py DELETED
@@ -1,130 +0,0 @@
1
- # coding=utf-8
2
- # Copyright 2020 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
- import json
18
-
19
- import datasets
20
-
21
-
22
- _DESCRIPTION = """\
23
- The NQ-Open task, introduced by Lee et.al. 2019,
24
- is an open domain question answering benchmark that is derived from Natural Questions.
25
- The goal is to predict an English answer string for an input English question.
26
- All questions can be answered using the contents of English Wikipedia.
27
- """
28
-
29
- _HOMEPAGE_URL = "https://efficientqa.github.io/"
30
-
31
- _CITATION = """\
32
- @article{doi:10.1162/tacl_a_00276,
33
- author = {Kwiatkowski, Tom and Palomaki, Jennimaria and Redfield, Olivia and Collins, Michael and Parikh, Ankur and Alberti, Chris and Epstein, Danielle and Polosukhin, Illia and Devlin, Jacob and Lee, Kenton and Toutanova, Kristina and Jones, Llion and Kelcey, Matthew and Chang, Ming-Wei and Dai, Andrew M. and Uszkoreit, Jakob and Le, Quoc and Petrov, Slav},
34
- title = {Natural Questions: A Benchmark for Question Answering Research},
35
- journal = {Transactions of the Association for Computational Linguistics},
36
- volume = {7},
37
- number = {},
38
- pages = {453-466},
39
- year = {2019},
40
- doi = {10.1162/tacl_a_00276},
41
- URL = {
42
- https://doi.org/10.1162/tacl_a_00276
43
- },
44
- eprint = {
45
- https://doi.org/10.1162/tacl_a_00276
46
- },
47
- abstract = { We present the Natural Questions corpus, a question answering data set. Questions consist of real anonymized, aggregated queries issued to the Google search engine. An annotator is presented with a question along with a Wikipedia page from the top 5 search results, and annotates a long answer (typically a paragraph) and a short answer (one or more entities) if present on the page, or marks null if no long/short answer is present. The public release consists of 307,373 training examples with single annotations; 7,830 examples with 5-way annotations for development data; and a further 7,842 examples with 5-way annotated sequestered as test data. We present experiments validating quality of the data. We also describe analysis of 25-way annotations on 302 examples, giving insights into human variability on the annotation task. We introduce robust metrics for the purposes of evaluating question answering systems; demonstrate high human upper bounds on these metrics; and establish baseline results using competitive methods drawn from related literature. }
48
- }
49
-
50
- @inproceedings{lee-etal-2019-latent,
51
- title = "Latent Retrieval for Weakly Supervised Open Domain Question Answering",
52
- author = "Lee, Kenton and
53
- Chang, Ming-Wei and
54
- Toutanova, Kristina",
55
- booktitle = "Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics",
56
- month = jul,
57
- year = "2019",
58
- address = "Florence, Italy",
59
- publisher = "Association for Computational Linguistics",
60
- url = "https://www.aclweb.org/anthology/P19-1612",
61
- doi = "10.18653/v1/P19-1612",
62
- pages = "6086--6096",
63
- abstract = "Recent work on open domain question answering (QA) assumes strong supervision of the supporting evidence and/or assumes a blackbox information retrieval (IR) system to retrieve evidence candidates. We argue that both are suboptimal, since gold evidence is not always available, and QA is fundamentally different from IR. We show for the first time that it is possible to jointly learn the retriever and reader from question-answer string pairs and without any IR system. In this setting, evidence retrieval from all of Wikipedia is treated as a latent variable. Since this is impractical to learn from scratch, we pre-train the retriever with an Inverse Cloze Task. We evaluate on open versions of five QA datasets. On datasets where the questioner already knows the answer, a traditional IR system such as BM25 is sufficient. On datasets where a user is genuinely seeking an answer, we show that learned retrieval is crucial, outperforming BM25 by up to 19 points in exact match.",
64
- }
65
- """
66
-
67
- _URLS = {
68
- "dev": "https://raw.githubusercontent.com/google-research-datasets/natural-questions/master/nq_open/NQ-open.dev.jsonl",
69
- "train": "https://raw.githubusercontent.com/google-research-datasets/natural-questions/master/nq_open/NQ-open.train.jsonl",
70
- }
71
-
72
-
73
- class NQOpenConfig(datasets.BuilderConfig):
74
- """BuilderConfig for NQ_Open."""
75
-
76
- def __init__(self, **kwargs):
77
- """BuilderConfig for NQ_Open.
78
- Args:
79
- **kwargs: keyword arguments forwarded to super.
80
- """
81
- super(NQOpenConfig, self).__init__(**kwargs)
82
-
83
-
84
- class NQOpen(datasets.GeneratorBasedBuilder):
85
- """NQ_Open open domain question answering dataset."""
86
-
87
- BUILDER_CONFIGS = [
88
- NQOpenConfig(
89
- name="nq_open",
90
- version=datasets.Version("2.0.0", ""),
91
- description="NQ_Open open domain question answering dataset.",
92
- ),
93
- ]
94
- BUILDER_CONFIG_CLASS = NQOpenConfig
95
-
96
- def _info(self):
97
- return datasets.DatasetInfo(
98
- description=_DESCRIPTION,
99
- features=datasets.Features(
100
- {
101
- "question": datasets.Value("string"),
102
- "answer": datasets.Sequence(datasets.Value("string")),
103
- }
104
- ),
105
- supervised_keys=None,
106
- homepage=_HOMEPAGE_URL,
107
- citation=_CITATION,
108
- )
109
-
110
- def _split_generators(self, dl_manager):
111
- paths = dl_manager.download_and_extract(_URLS)
112
-
113
- return [
114
- datasets.SplitGenerator(
115
- name=datasets.Split.TRAIN,
116
- gen_kwargs={"datapath": paths["train"]},
117
- ),
118
- datasets.SplitGenerator(
119
- name=datasets.Split.VALIDATION,
120
- gen_kwargs={"datapath": paths["dev"]},
121
- ),
122
- ]
123
-
124
- def _generate_examples(self, datapath):
125
- """Generate NQ_Open examples."""
126
-
127
- with open(datapath, encoding="utf-8") as json_file:
128
- for i, json_str in enumerate(json_file):
129
- result = json.loads(json_str)
130
- yield i, result
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
nq_open/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25d3a544324f900b31ebc05a3a5686bdd5b9b42738133500675c3f20eee7d83a
3
+ size 4464642
nq_open/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b074bed0bccb56fa1551a8ac1c9c51ce89bc11c7fbb6a9c713b2c33a98531e12
3
+ size 213603