Datasets:

Modalities:
Text
Formats:
parquet
Languages:
English
ArXiv:
Libraries:
Datasets
pandas
License:
system HF staff commited on
Commit
0316ec0
0 Parent(s):

Update files from the datasets library (from 1.0.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.0.0

Files changed (4) hide show
  1. .gitattributes +27 -0
  2. dataset_infos.json +1 -0
  3. drop.py +96 -0
  4. dummy/0.1.0/dummy_data.zip +3 -0
.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"default": {"description": "DROP: A Reading Comprehension Benchmark Requiring Discrete Reasoning Over Paragraphs.\n. DROP is a crowdsourced, adversarially-created, 96k-question benchmark, in which a system must resolve references in a \nquestion, perhaps to multiple input positions, and perform discrete operations over them (such as addition, counting, or\n sorting). These operations require a much more comprehensive understanding of the content of paragraphs than what was \n necessary for prior datasets.\n", "citation": "@inproceedings{Dua2019DROP,\n author={Dheeru Dua and Yizhong Wang and Pradeep Dasigi and Gabriel Stanovsky and Sameer Singh and Matt Gardner},\n title={ {DROP}: A Reading Comprehension Benchmark Requiring Discrete Reasoning Over Paragraphs},\n booktitle={Proc. of NAACL},\n year={2019}\n}\n", "homepage": "https://allennlp.org/drop", "license": "", "features": {"passage": {"dtype": "string", "id": null, "_type": "Value"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "answers_spans": {"feature": {"spans": {"dtype": "string", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}}, "supervised_keys": null, "builder_name": "drop", "config_name": "default", "version": {"version_str": "0.1.0", "description": null, "datasets_version_to_prepare": null, "major": 0, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 100119741, "num_examples": 77409, "dataset_name": "drop"}, "validation": {"name": "validation", "num_bytes": 10788180, "num_examples": 9536, "dataset_name": "drop"}}, "download_checksums": {"https://s3-us-west-2.amazonaws.com/allennlp/datasets/drop/drop_dataset.zip": {"num_bytes": 8308692, "checksum": "39d2278a29fd729de301b111a45f434c24834f40df8f4ff116d864589e3249d6"}}, "download_size": 8308692, "dataset_size": 110907921, "size_in_bytes": 119216613}}
drop.py ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """TODO(drop): Add a description here."""
2
+
3
+ from __future__ import absolute_import, division, print_function
4
+
5
+ import json
6
+ import os
7
+
8
+ import datasets
9
+
10
+
11
+ # TODO(drop): BibTeX citation
12
+ _CITATION = """\
13
+ @inproceedings{Dua2019DROP,
14
+ author={Dheeru Dua and Yizhong Wang and Pradeep Dasigi and Gabriel Stanovsky and Sameer Singh and Matt Gardner},
15
+ title={DROP: A Reading Comprehension Benchmark Requiring Discrete Reasoning Over Paragraphs},
16
+ booktitle={Proc. of NAACL},
17
+ year={2019}
18
+ }
19
+ """
20
+
21
+ # TODO(drop):
22
+ _DESCRIPTION = """\
23
+ DROP: A Reading Comprehension Benchmark Requiring Discrete Reasoning Over Paragraphs.
24
+ . DROP is a crowdsourced, adversarially-created, 96k-question benchmark, in which a system must resolve references in a
25
+ question, perhaps to multiple input positions, and perform discrete operations over them (such as addition, counting, or
26
+ sorting). These operations require a much more comprehensive understanding of the content of paragraphs than what was
27
+ necessary for prior datasets.
28
+ """
29
+ _URl = "https://s3-us-west-2.amazonaws.com/allennlp/datasets/drop/drop_dataset.zip"
30
+
31
+
32
+ class Drop(datasets.GeneratorBasedBuilder):
33
+ """TODO(drop): Short description of my dataset."""
34
+
35
+ # TODO(drop): Set up version.
36
+ VERSION = datasets.Version("0.1.0")
37
+
38
+ def _info(self):
39
+ # TODO(drop): Specifies the datasets.DatasetInfo object
40
+ return datasets.DatasetInfo(
41
+ # This is the description that will appear on the datasets page.
42
+ description=_DESCRIPTION,
43
+ # datasets.features.FeatureConnectors
44
+ features=datasets.Features(
45
+ {
46
+ "passage": datasets.Value("string"),
47
+ "question": datasets.Value("string"),
48
+ "answers_spans": datasets.features.Sequence({"spans": datasets.Value("string")})
49
+ # These are the features of your dataset like images, labels ...
50
+ }
51
+ ),
52
+ # If there's a common (input, target) tuple from the features,
53
+ # specify them here. They'll be used if as_supervised=True in
54
+ # builder.as_dataset.
55
+ supervised_keys=None,
56
+ # Homepage of the dataset for documentation
57
+ homepage="https://allennlp.org/drop",
58
+ citation=_CITATION,
59
+ )
60
+
61
+ def _split_generators(self, dl_manager):
62
+ """Returns SplitGenerators."""
63
+ # TODO(drop): Downloads the data and defines the splits
64
+ # dl_manager is a datasets.download.DownloadManager that can be used to
65
+ # download and extract URLs
66
+ dl_dir = dl_manager.download_and_extract(_URl)
67
+ data_dir = os.path.join(dl_dir, "drop_dataset")
68
+ return [
69
+ datasets.SplitGenerator(
70
+ name=datasets.Split.TRAIN,
71
+ # These kwargs will be passed to _generate_examples
72
+ gen_kwargs={"filepath": os.path.join(data_dir, "drop_dataset_train.json")},
73
+ ),
74
+ datasets.SplitGenerator(
75
+ name=datasets.Split.VALIDATION,
76
+ # These kwargs will be passed to _generate_examples
77
+ gen_kwargs={"filepath": os.path.join(data_dir, "drop_dataset_dev.json")},
78
+ ),
79
+ ]
80
+
81
+ def _generate_examples(self, filepath):
82
+ """Yields examples."""
83
+ # TODO(drop): Yields (key, example) tuples from the dataset
84
+ with open(filepath, encoding="utf-8") as f:
85
+ data = json.load(f)
86
+ for i, key in enumerate(data):
87
+ example = data[key]
88
+ qa_pairs = example["qa_pairs"]
89
+ for j, qa in enumerate(qa_pairs):
90
+ question = qa["question"]
91
+ answers = qa["answer"]["spans"]
92
+ yield str(i) + "_" + str(j), {
93
+ "passage": example["passage"],
94
+ "question": question,
95
+ "answers_spans": {"spans": answers},
96
+ }
dummy/0.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c03cd6d5d77bd4d2046c61dbe046a4a580a69a516deafaa657f0cf8b07b933a1
3
+ size 2510