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
1234567489101112131415161718192021222382425262792 unmodified lines12012112210710810912312412512612712812947 unmodified lines177178179163180181182183---annotations_creators:- no-annotationlanguage_creators:- crowdsourcedlanguages:- enpaperswithcode_id: natural-questionslicenses:- 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"# Dataset Card for Natural Questions
## Table of Contents- [Dataset Description](#dataset-description)92 unmodified lines
### Data Splits
| name |train |validation||-------|-----:|---------:||default|307373| 7830|| name | train | validation ||---------|-------:|-----------:|| default | 307373 | 7830 || dev | N/A | 7830 |
## Dataset Creation
47 unmodified lines
### Licensing Information
[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)[Creative Commons Attribution-ShareAlike 3.0 Unported](https://creativecommons.org/licenses/by-sa/3.0/).
### Citation Information
50 unmodified lines5152535455565758595859606162636465666745 unmodified lines1131141151111121161171181191201211151221231181191201211221231241241251261271281291301315 unmodified lines13713813913614014114214350 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."""
VERSION = datasets.Version("0.0.2") SUPPORTED_VERSIONS = [datasets.Version("0.0.1")] 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 lines
def _split_generators(self, dl_manager, pipeline): """Returns SplitGenerators."""
files = dl_manager.download(_DOWNLOAD_URLS) urls = _DOWNLOAD_URLS if 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=datasets.Split.TRAIN, gen_kwargs={"filepaths": files["train"]}, ), datasets.SplitGenerator( name=datasets.Split.VALIDATION, gen_kwargs={"filepaths": files["validation"]}, ), 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 lines html_bytes = ex_json["document_html"].encode("utf-8")
def _parse_short_answer(short_ans): """ "Extract text of short answer.""" """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