Datasets:

Modalities:
Text
Formats:
parquet
Sub-tasks:
extractive-qa
Languages:
English
ArXiv:
Libraries:
Datasets
pandas
License:
albertvillanova HF staff commited on
Commit
d59f1e2
1 Parent(s): f952e07

Convert dataset to Parquet (#2)

Browse files

- Convert dataset to Parquet (81f0ec71ff02b9761cccb52b804b8cfe7013695a)
- Delete loading script (239fef93adf27bcc55dd1057efd77441ab640c12)
- Delete legacy dataset_infos.json (7e8df1277151ceb787c650e4f4ab16c436d19059)

README.md CHANGED
@@ -1,5 +1,4 @@
1
  ---
2
- pretty_name: ROPES
3
  annotations_creators:
4
  - crowdsourced
5
  language_creators:
@@ -21,7 +20,9 @@ task_categories:
21
  task_ids:
22
  - extractive-qa
23
  paperswithcode_id: ropes
 
24
  dataset_info:
 
25
  features:
26
  - name: id
27
  dtype: string
@@ -35,19 +36,28 @@ dataset_info:
35
  sequence:
36
  - name: text
37
  dtype: string
38
- config_name: plain_text
39
  splits:
40
  - name: train
41
- num_bytes: 12231940
42
  num_examples: 10924
43
  - name: test
44
- num_bytes: 1928532
45
  num_examples: 1710
46
  - name: validation
47
- num_bytes: 1643498
48
  num_examples: 1688
49
- download_size: 3516917
50
- dataset_size: 15803970
 
 
 
 
 
 
 
 
 
 
51
  ---
52
 
53
  # Dataset Card for ROPES
 
1
  ---
 
2
  annotations_creators:
3
  - crowdsourced
4
  language_creators:
 
20
  task_ids:
21
  - extractive-qa
22
  paperswithcode_id: ropes
23
+ pretty_name: ROPES
24
  dataset_info:
25
+ config_name: plain_text
26
  features:
27
  - name: id
28
  dtype: string
 
36
  sequence:
37
  - name: text
38
  dtype: string
 
39
  splits:
40
  - name: train
41
+ num_bytes: 12231892
42
  num_examples: 10924
43
  - name: test
44
+ num_bytes: 1928508
45
  num_examples: 1710
46
  - name: validation
47
+ num_bytes: 1643474
48
  num_examples: 1688
49
+ download_size: 1372548
50
+ dataset_size: 15803874
51
+ configs:
52
+ - config_name: plain_text
53
+ data_files:
54
+ - split: train
55
+ path: plain_text/train-*
56
+ - split: test
57
+ path: plain_text/test-*
58
+ - split: validation
59
+ path: plain_text/validation-*
60
+ default: true
61
  ---
62
 
63
  # Dataset Card for ROPES
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"plain_text": {"description": "ROPES (Reasoning Over Paragraph Effects in Situations) is a QA dataset\nwhich tests a system's ability to apply knowledge from a passage\nof text to a new situation. A system is presented a background\npassage containing a causal or qualitative relation(s) (e.g.,\n\"animal pollinators increase efficiency of fertilization in flowers\"),\na novel situation that uses this background, and questions that require\nreasoning about effects of the relationships in the background\npassage in the background of the situation.\n", "citation": "@inproceedings{Lin2019ReasoningOP,\n title={Reasoning Over Paragraph Effects in Situations},\n author={Kevin Lin and Oyvind Tafjord and Peter Clark and Matt Gardner},\n booktitle={MRQA@EMNLP},\n year={2019}\n}\n", "homepage": "https://allenai.org/data/ropes", "license": "CC BY 4.0", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "background": {"dtype": "string", "id": null, "_type": "Value"}, "situation": {"dtype": "string", "id": null, "_type": "Value"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "answers": {"feature": {"text": {"dtype": "string", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "ropes", "config_name": "plain_text", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 12231940, "num_examples": 10924, "dataset_name": "ropes"}, "test": {"name": "test", "num_bytes": 1928532, "num_examples": 1710, "dataset_name": "ropes"}, "validation": {"name": "validation", "num_bytes": 1643498, "num_examples": 1688, "dataset_name": "ropes"}}, "download_checksums": {"https://ropes-dataset.s3-us-west-2.amazonaws.com/train_and_dev/ropes-train-dev-v1.0.tar.gz": {"num_bytes": 3395072, "checksum": "ba26329832f84d8c2660de1120a1d7ff086cdf8580eabeebd721c092020763e2"}, "https://ropes-dataset.s3-us-west-2.amazonaws.com/test/ropes-test-questions-v1.0.tar.gz": {"num_bytes": 121845, "checksum": "a489b9d0c0f2bcf495f6eab089ba4915e7832dc656237b40497acdccb8a45f95"}}, "download_size": 3516917, "post_processing_size": null, "dataset_size": 15803970, "size_in_bytes": 19320887}}
 
 
plain_text/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95b2ae3c1403b56a8e6a9250ccf7b0667b4c1b82b68694050654b142f5e868a6
3
+ size 199757
plain_text/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5dd4781f69556326f366989e1e5df6603b43269388d5c2e22e0a7229c08df687
3
+ size 1063606
plain_text/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5ad558e4089cbc1c0014fcd72f2bdfa3271d0a2ab04d19823ebba927323b6e26
3
+ size 109185
ropes.py DELETED
@@ -1,138 +0,0 @@
1
- # coding=utf-8
2
- # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
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
- """ROPES dataset.
16
- Code is heavily inspired from https://github.com/huggingface/datasets/blob/master/datasets/squad/squad.py"""
17
-
18
-
19
- import json
20
-
21
- import datasets
22
-
23
-
24
- _CITATION = """\
25
- @inproceedings{Lin2019ReasoningOP,
26
- title={Reasoning Over Paragraph Effects in Situations},
27
- author={Kevin Lin and Oyvind Tafjord and Peter Clark and Matt Gardner},
28
- booktitle={MRQA@EMNLP},
29
- year={2019}
30
- }
31
- """
32
-
33
- _DESCRIPTION = """\
34
- ROPES (Reasoning Over Paragraph Effects in Situations) is a QA dataset
35
- which tests a system's ability to apply knowledge from a passage
36
- of text to a new situation. A system is presented a background
37
- passage containing a causal or qualitative relation(s) (e.g.,
38
- "animal pollinators increase efficiency of fertilization in flowers"),
39
- a novel situation that uses this background, and questions that require
40
- reasoning about effects of the relationships in the background
41
- passage in the background of the situation.
42
- """
43
-
44
- _LICENSE = "CC BY 4.0"
45
-
46
- _URLs = {
47
- "train+dev": "https://ropes-dataset.s3-us-west-2.amazonaws.com/train_and_dev/ropes-train-dev-v1.0.tar.gz",
48
- "test": "https://ropes-dataset.s3-us-west-2.amazonaws.com/test/ropes-test-questions-v1.0.tar.gz",
49
- }
50
-
51
-
52
- class Ropes(datasets.GeneratorBasedBuilder):
53
- """ROPES datset: testing a system's ability
54
- to apply knowledge from a passage of text to a new situation.."""
55
-
56
- VERSION = datasets.Version("1.1.0")
57
-
58
- BUILDER_CONFIGS = [
59
- datasets.BuilderConfig(name="plain_text", description="Plain text", version=VERSION),
60
- ]
61
-
62
- def _info(self):
63
- return datasets.DatasetInfo(
64
- description=_DESCRIPTION,
65
- features=datasets.Features(
66
- {
67
- "id": datasets.Value("string"),
68
- "background": datasets.Value("string"),
69
- "situation": datasets.Value("string"),
70
- "question": datasets.Value("string"),
71
- "answers": datasets.features.Sequence(
72
- {
73
- "text": datasets.Value("string"),
74
- }
75
- ),
76
- }
77
- ),
78
- supervised_keys=None,
79
- homepage="https://allenai.org/data/ropes",
80
- license=_LICENSE,
81
- citation=_CITATION,
82
- )
83
-
84
- def _split_generators(self, dl_manager):
85
- """Returns SplitGenerators."""
86
- archives = dl_manager.download(_URLs)
87
-
88
- return [
89
- datasets.SplitGenerator(
90
- name=datasets.Split.TRAIN,
91
- gen_kwargs={
92
- "filepath": "/".join(["ropes-train-dev-v1.0", "train-v1.0.json"]),
93
- "split": "train",
94
- "files": dl_manager.iter_archive(archives["train+dev"]),
95
- },
96
- ),
97
- datasets.SplitGenerator(
98
- name=datasets.Split.TEST,
99
- gen_kwargs={
100
- "filepath": "/".join(["ropes-test-questions-v1.0", "test-1.0.json"]),
101
- "split": "test",
102
- "files": dl_manager.iter_archive(archives["test"]),
103
- },
104
- ),
105
- datasets.SplitGenerator(
106
- name=datasets.Split.VALIDATION,
107
- gen_kwargs={
108
- "filepath": "/".join(["ropes-train-dev-v1.0", "dev-v1.0.json"]),
109
- "split": "dev",
110
- "files": dl_manager.iter_archive(archives["train+dev"]),
111
- },
112
- ),
113
- ]
114
-
115
- def _generate_examples(self, filepath, split, files):
116
- """Yields examples."""
117
- for path, f in files:
118
- if path == filepath:
119
- ropes = json.loads(f.read().decode("utf-8"))
120
- for article in ropes["data"]:
121
- for paragraph in article["paragraphs"]:
122
- background = paragraph["background"].strip()
123
- situation = paragraph["situation"].strip()
124
- for qa in paragraph["qas"]:
125
- question = qa["question"].strip()
126
- id_ = qa["id"]
127
- answers = [] if split == "test" else [answer["text"].strip() for answer in qa["answers"]]
128
-
129
- yield id_, {
130
- "background": background,
131
- "situation": situation,
132
- "question": question,
133
- "id": id_,
134
- "answers": {
135
- "text": answers,
136
- },
137
- }
138
- break