Datasets:
Tasks:
Question Answering
Modalities:
Text
Formats:
parquet
Sub-tasks:
open-domain-qa
Languages:
English
Size:
1K - 10K
License:
Commit ·
d4635b4
1
Parent(s): 789f9d6
Fix typo in train split name (#3751)
Browse files* Fix typo in README guide
* Fix split naming and table alignment in README guide
* Fix split naming and table alignment in all datasets
* Fix previously malformed dataset cards
* Fix previously malformed dataset cards
Commit from https://github.com/huggingface/datasets/commit/af6e54febe3b822118dfed28ddb797d8350e5d27
Files changed (2)
- README.md+23-6
- natural_questions.py+17-13
123456789101192 unmodified lines10410510610710810911011111247 unmodified lines160161162163164165166---languages:- enpaperswithcode_id: natural-questionspretty_name: Natural Questions---# Dataset Card for "natural_questions"## Table of Contents- [Dataset Description](#dataset-description)92 unmodified lines### Data Splits| name |train |validation||-------|-----:|---------:||default|307373| 7830|## Dataset Creation47 unmodified lines### Licensing Information[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)### Citation Information12345678910111213141516171819202122232425262792 unmodified lines12012112212312412512612712812947 unmodified lines177178179180181182183---annotations_creators:- no-annotationlanguage_creators:- crowdsourcedlanguages:- enlicenses:- cc-by-sa-3-0multilinguality:- monolingualpretty_name: Natural Questionssize_categories:- 100K<n<1Msource_datasets:- originaltask_categories:- question-answeringtask_ids:- open-domain-qapaperswithcode_id: natural-questions---# Dataset Card for Natural Questions## Table of Contents- [Dataset Description](#dataset-description)92 unmodified lines### Data Splits| name | train | validation ||---------|-------:|-----------:|| default | 307373 | 7830 || dev | N/A | 7830 |## Dataset Creation47 unmodified lines### Licensing Information[Creative Commons Attribution-ShareAlike 3.0 Unported](https://creativecommons.org/licenses/by-sa/3.0/).### Citation Information
50 unmodified lines51525354555657585960616245 unmodified lines1081091101111121131141151161171181191201211221231241251261275 unmodified lines13313413513613713813950 unmodified lines"validation": ["%s/dev/nq-dev-%02d.jsonl.gz" % (_BASE_DOWNLOAD_URL, i) for i in range(5)],}class NaturalQuestions(datasets.BeamBasedBuilder):"""Natural Questions: A Benchmark for Question Answering Research."""VERSION = datasets.Version("0.0.2")SUPPORTED_VERSIONS = [datasets.Version("0.0.1")]def _info(self):return datasets.DatasetInfo(45 unmodified linesdef _split_generators(self, dl_manager, pipeline):"""Returns SplitGenerators."""files = dl_manager.download(_DOWNLOAD_URLS)if not pipeline.is_local():files = dl_manager.ship_files_with_pipeline(files, pipeline)return [datasets.SplitGenerator(name=datasets.Split.TRAIN,gen_kwargs={"filepaths": files["train"]},),datasets.SplitGenerator(name=datasets.Split.VALIDATION,gen_kwargs={"filepaths": files["validation"]},),]def _build_pcollection(self, pipeline, filepaths):5 unmodified lineshtml_bytes = ex_json["document_html"].encode("utf-8")def _parse_short_answer(short_ans):""" "Extract text of short answer."""ans_bytes = html_bytes[short_ans["start_byte"] : short_ans["end_byte"]]# Remove non-breaking spaces.ans_bytes = ans_bytes.replace(b"\xc2\xa0", b" ")50 unmodified lines515253545556575859606162636465666745 unmodified lines1131141151161171181191201211221231241251261271281291301315 unmodified lines13713813914014114214350 unmodified lines"validation": ["%s/dev/nq-dev-%02d.jsonl.gz" % (_BASE_DOWNLOAD_URL, i) for i in range(5)],}_VERSION = datasets.Version("0.0.3")class NaturalQuestions(datasets.BeamBasedBuilder):"""Natural Questions: A Benchmark for Question Answering Research."""BUILDER_CONFIGS = [datasets.BuilderConfig(name="default", version=_VERSION),datasets.BuilderConfig(name="dev", version=_VERSION, description="Only dev split"),]DEFAULT_CONFIG_NAME = "default"def _info(self):return datasets.DatasetInfo(45 unmodified linesdef _split_generators(self, dl_manager, pipeline):"""Returns SplitGenerators."""urls = _DOWNLOAD_URLSif self.config.name == "dev":urls = {"validation": urls["validation"]}files = dl_manager.download(urls)if not pipeline.is_local():files = dl_manager.ship_files_with_pipeline(files, pipeline)return [datasets.SplitGenerator(name=split,gen_kwargs={"filepaths": files[split]},)for split in [datasets.Split.TRAIN, datasets.Split.VALIDATION]if split in files]def _build_pcollection(self, pipeline, filepaths):5 unmodified lineshtml_bytes = ex_json["document_html"].encode("utf-8")def _parse_short_answer(short_ans):"""Extract text of short answer."""ans_bytes = html_bytes[short_ans["start_byte"] : short_ans["end_byte"]]# Remove non-breaking spaces.ans_bytes = ans_bytes.replace(b"\xc2\xa0", b" ")
README.md+23-6
natural_questions.py+17-13