Datasets:

Modalities:
Text
Languages:
English
ArXiv:
Libraries:
Datasets
License:

Convert dataset to Parquet

#4
README.md CHANGED
@@ -1,13 +1,10 @@
1
  ---
2
- pretty_name: QASPER
3
  annotations_creators:
4
  - expert-generated
5
  language_creators:
6
  - expert-generated
7
  language:
8
  - en
9
- language_bcp47:
10
- - en-US
11
  license:
12
  - cc-by-4.0
13
  multilinguality:
@@ -21,6 +18,87 @@ task_categories:
21
  task_ids:
22
  - closed-domain-qa
23
  paperswithcode_id: qasper
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  ---
25
 
26
  # Dataset Card for Qasper
 
1
  ---
 
2
  annotations_creators:
3
  - expert-generated
4
  language_creators:
5
  - expert-generated
6
  language:
7
  - en
 
 
8
  license:
9
  - cc-by-4.0
10
  multilinguality:
 
18
  task_ids:
19
  - closed-domain-qa
20
  paperswithcode_id: qasper
21
+ pretty_name: QASPER
22
+ language_bcp47:
23
+ - en-US
24
+ dataset_info:
25
+ config_name: qasper
26
+ features:
27
+ - name: id
28
+ dtype: string
29
+ - name: title
30
+ dtype: string
31
+ - name: abstract
32
+ dtype: string
33
+ - name: full_text
34
+ sequence:
35
+ - name: section_name
36
+ dtype: string
37
+ - name: paragraphs
38
+ list: string
39
+ - name: qas
40
+ sequence:
41
+ - name: question
42
+ dtype: string
43
+ - name: question_id
44
+ dtype: string
45
+ - name: nlp_background
46
+ dtype: string
47
+ - name: topic_background
48
+ dtype: string
49
+ - name: paper_read
50
+ dtype: string
51
+ - name: search_query
52
+ dtype: string
53
+ - name: question_writer
54
+ dtype: string
55
+ - name: answers
56
+ sequence:
57
+ - name: answer
58
+ struct:
59
+ - name: unanswerable
60
+ dtype: bool
61
+ - name: extractive_spans
62
+ sequence: string
63
+ - name: yes_no
64
+ dtype: bool
65
+ - name: free_form_answer
66
+ dtype: string
67
+ - name: evidence
68
+ sequence: string
69
+ - name: highlighted_evidence
70
+ sequence: string
71
+ - name: annotation_id
72
+ dtype: string
73
+ - name: worker_id
74
+ dtype: string
75
+ - name: figures_and_tables
76
+ sequence:
77
+ - name: caption
78
+ dtype: string
79
+ - name: file
80
+ dtype: string
81
+ splits:
82
+ - name: train
83
+ num_bytes: 28466446
84
+ num_examples: 888
85
+ - name: validation
86
+ num_bytes: 9900193
87
+ num_examples: 281
88
+ - name: test
89
+ num_bytes: 15488891
90
+ num_examples: 416
91
+ download_size: 26199265
92
+ dataset_size: 53855530
93
+ configs:
94
+ - config_name: qasper
95
+ data_files:
96
+ - split: train
97
+ path: qasper/train-*
98
+ - split: validation
99
+ path: qasper/validation-*
100
+ - split: test
101
+ path: qasper/test-*
102
  ---
103
 
104
  # Dataset Card for Qasper
dataset_infos.json DELETED
@@ -1,212 +0,0 @@
1
- {
2
- "qasper": {
3
- "description": "A dataset containing 1585 papers with 5049 information-seeking questions asked by regular readers of NLP papers, and answered by a separate set of NLP practitioners.\n",
4
- "citation": "@inproceedings{Dasigi2021ADO,\n title={A Dataset of Information-Seeking Questions and Answers Anchored in Research Papers},\n author={Pradeep Dasigi and Kyle Lo and Iz Beltagy and Arman Cohan and Noah A. Smith and Matt Gardner},\n year={2021}\n}\n",
5
- "homepage": "https://allenai.org/data/qasper",
6
- "license": "CC BY 4.0",
7
- "features": {
8
- "id": {
9
- "dtype": "string",
10
- "id": null,
11
- "_type": "Value"
12
- },
13
- "title": {
14
- "dtype": "string",
15
- "id": null,
16
- "_type": "Value"
17
- },
18
- "abstract": {
19
- "dtype": "string",
20
- "id": null,
21
- "_type": "Value"
22
- },
23
- "full_text": {
24
- "feature": {
25
- "section_name": {
26
- "dtype": "string",
27
- "id": null,
28
- "_type": "Value"
29
- },
30
- "paragraphs": [
31
- {
32
- "dtype": "string",
33
- "id": null,
34
- "_type": "Value"
35
- }
36
- ]
37
- },
38
- "length": -1,
39
- "id": null,
40
- "_type": "Sequence"
41
- },
42
- "qas": {
43
- "feature": {
44
- "question": {
45
- "dtype": "string",
46
- "id": null,
47
- "_type": "Value"
48
- },
49
- "question_id": {
50
- "dtype": "string",
51
- "id": null,
52
- "_type": "Value"
53
- },
54
- "nlp_background": {
55
- "dtype": "string",
56
- "id": null,
57
- "_type": "Value"
58
- },
59
- "topic_background": {
60
- "dtype": "string",
61
- "id": null,
62
- "_type": "Value"
63
- },
64
- "paper_read": {
65
- "dtype": "string",
66
- "id": null,
67
- "_type": "Value"
68
- },
69
- "search_query": {
70
- "dtype": "string",
71
- "id": null,
72
- "_type": "Value"
73
- },
74
- "question_writer": {
75
- "dtype": "string",
76
- "id": null,
77
- "_type": "Value"
78
- },
79
- "answers": {
80
- "feature": {
81
- "answer": {
82
- "unanswerable": {
83
- "dtype": "bool",
84
- "id": null,
85
- "_type": "Value"
86
- },
87
- "extractive_spans": {
88
- "feature": {
89
- "dtype": "string",
90
- "id": null,
91
- "_type": "Value"
92
- },
93
- "length": -1,
94
- "id": null,
95
- "_type": "Sequence"
96
- },
97
- "yes_no": {
98
- "dtype": "bool",
99
- "id": null,
100
- "_type": "Value"
101
- },
102
- "free_form_answer": {
103
- "dtype": "string",
104
- "id": null,
105
- "_type": "Value"
106
- },
107
- "evidence": {
108
- "feature": {
109
- "dtype": "string",
110
- "id": null,
111
- "_type": "Value"
112
- },
113
- "length": -1,
114
- "id": null,
115
- "_type": "Sequence"
116
- },
117
- "highlighted_evidence": {
118
- "feature": {
119
- "dtype": "string",
120
- "id": null,
121
- "_type": "Value"
122
- },
123
- "length": -1,
124
- "id": null,
125
- "_type": "Sequence"
126
- }
127
- },
128
- "annotation_id": {
129
- "dtype": "string",
130
- "id": null,
131
- "_type": "Value"
132
- },
133
- "worker_id": {
134
- "dtype": "string",
135
- "id": null,
136
- "_type": "Value"
137
- }
138
- },
139
- "length": -1,
140
- "id": null,
141
- "_type": "Sequence"
142
- }
143
- },
144
- "length": -1,
145
- "id": null,
146
- "_type": "Sequence"
147
- },
148
- "figures_and_tables": {
149
- "feature": {
150
- "caption": {
151
- "dtype": "string",
152
- "id": null,
153
- "_type": "Value"
154
- },
155
- "file": {
156
- "dtype": "string",
157
- "id": null,
158
- "_type": "Value"
159
- }
160
- },
161
- "length": -1,
162
- "id": null,
163
- "_type": "Sequence"
164
- }
165
- },
166
- "post_processed": null,
167
- "supervised_keys": null,
168
- "builder_name": "qasper",
169
- "config_name": "qasper",
170
- "version": {
171
- "version_str": "0.3.0",
172
- "description": null,
173
- "major": 0,
174
- "minor": 3,
175
- "patch": 0
176
- },
177
- "splits": {
178
- "train": {
179
- "name": "train",
180
- "num_bytes": 27277970,
181
- "num_examples": 888,
182
- "dataset_name": "qasper"
183
- },
184
- "validation": {
185
- "name": "validation",
186
- "num_bytes": 9535330,
187
- "num_examples": 281,
188
- "dataset_name": "qasper"
189
- },
190
- "test": {
191
- "name": "test",
192
- "num_bytes": 9535330,
193
- "num_examples": 416,
194
- "dataset_name": "qasper"
195
- }
196
- },
197
- "download_checksums": {
198
- "https://qasper-dataset.s3.us-west-2.amazonaws.com/qasper-train-dev-v0.3.tgz": {
199
- "num_bytes": 10835856,
200
- "checksum": "a28fdf966db827bcee3d873107d6b6669864fb7ca8fbf73a192f5e39191bdb5a"
201
- },
202
- "https://qasper-dataset.s3.us-west-2.amazonaws.com/qasper-test-and-evaluator-v0.3.tgz": {
203
- "num_bytes": 3865061,
204
- "checksum": "72a52a41193e2838b8074f80ac074b94f956b84886c36a61c58a7df4171bdd72"
205
- }
206
- },
207
- "download_size": 14700917,
208
- "post_processing_size": null,
209
- "dataset_size": 36813300,
210
- "size_in_bytes": 68556447
211
- }
212
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
qasper.py DELETED
@@ -1,152 +0,0 @@
1
- # coding=utf-8
2
- # Copyright 2022 The TensorFlow Datasets Authors and the 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
- """Qasper: A Dataset of Information-Seeking Questions and Answers Anchored in Research Papers."""
18
-
19
-
20
- import json
21
-
22
- import datasets
23
-
24
-
25
- logger = datasets.logging.get_logger(__name__)
26
-
27
-
28
- _CITATION = """\
29
- @inproceedings{Dasigi2021ADO,
30
- title={A Dataset of Information-Seeking Questions and Answers Anchored in Research Papers},
31
- author={Pradeep Dasigi and Kyle Lo and Iz Beltagy and Arman Cohan and Noah A. Smith and Matt Gardner},
32
- year={2021}
33
- }
34
- """
35
- _LICENSE = "CC BY 4.0"
36
- _DESCRIPTION = """\
37
- A dataset containing 1585 papers with 5049 information-seeking questions asked by regular readers of NLP papers, and answered by a separate set of NLP practitioners.
38
- """
39
-
40
- _HOMEPAGE = "https://allenai.org/data/qasper"
41
- _URL_TRAIN_DEV = "https://qasper-dataset.s3.us-west-2.amazonaws.com/qasper-train-dev-v0.3.tgz"
42
- _URL_TEST = "https://qasper-dataset.s3.us-west-2.amazonaws.com/qasper-test-and-evaluator-v0.3.tgz"
43
- _DATA_FILES = {"train": "qasper-train-v0.3.json",
44
- "dev": "qasper-dev-v0.3.json",
45
- "test": "qasper-test-v0.3.json"}
46
-
47
- _VERSION = "0.3.0"
48
-
49
-
50
- class Qasper(datasets.GeneratorBasedBuilder):
51
- """Qasper: A Dataset of Information-Seeking Q&A Anchored in Research Papers."""
52
-
53
- BUILDER_CONFIGS = [
54
- datasets.BuilderConfig(
55
- name="qasper",
56
- version=datasets.Version(_VERSION),
57
- description=_DESCRIPTION,
58
- )
59
- ]
60
-
61
- def _info(self):
62
-
63
- features = datasets.Features(
64
- {
65
- "id": datasets.Value("string"),
66
- "title": datasets.Value("string"),
67
- "abstract": datasets.Value("string"),
68
- "full_text": datasets.features.Sequence(
69
- {
70
- "section_name": datasets.Value("string"),
71
- "paragraphs": [datasets.Value("string")],
72
- }
73
- ),
74
- "qas": datasets.features.Sequence(
75
- {
76
- "question": datasets.Value("string"),
77
- "question_id": datasets.Value("string"),
78
- "nlp_background": datasets.Value("string"),
79
- "topic_background": datasets.Value("string"),
80
- "paper_read": datasets.Value("string"),
81
- "search_query": datasets.Value("string"),
82
- "question_writer": datasets.Value("string"),
83
- "answers": datasets.features.Sequence(
84
- {
85
- "answer": {
86
- "unanswerable": datasets.Value("bool"),
87
- "extractive_spans": datasets.features.Sequence(datasets.Value("string")),
88
- "yes_no": datasets.Value("bool"),
89
- "free_form_answer": datasets.Value("string"),
90
- "evidence": datasets.features.Sequence(datasets.Value("string")),
91
- "highlighted_evidence": datasets.features.Sequence(datasets.Value("string")),
92
- },
93
- "annotation_id": datasets.Value("string"),
94
- "worker_id": datasets.Value("string"),
95
- }
96
- ),
97
- }
98
- ),
99
- "figures_and_tables": datasets.features.Sequence(
100
- {
101
- "caption": datasets.Value("string"),
102
- "file": datasets.Value("string"),
103
- }
104
- ),
105
- }
106
- )
107
-
108
- return datasets.DatasetInfo(
109
- description=_DESCRIPTION,
110
- features=features,
111
- supervised_keys=None,
112
- homepage=_HOMEPAGE,
113
- license=_LICENSE,
114
- citation=_CITATION,
115
- )
116
-
117
- def _split_generators(self, dl_manager):
118
- archive_train_dev, archive_test = dl_manager.download((
119
- _URL_TRAIN_DEV, _URL_TEST)
120
- )
121
-
122
- return [
123
- datasets.SplitGenerator(
124
- name=datasets.Split.TRAIN,
125
- gen_kwargs={
126
- "filepath": _DATA_FILES["train"],
127
- "files": dl_manager.iter_archive(archive_train_dev)},
128
- ),
129
- datasets.SplitGenerator(
130
- name=datasets.Split.VALIDATION,
131
- gen_kwargs={
132
- "filepath": _DATA_FILES["dev"],
133
- "files": dl_manager.iter_archive(archive_train_dev)},
134
- ),
135
- datasets.SplitGenerator(
136
- name=datasets.Split.TEST,
137
- gen_kwargs={
138
- "filepath": _DATA_FILES["test"],
139
- "files": dl_manager.iter_archive(archive_test)},
140
- ),
141
- ]
142
-
143
- def _generate_examples(self, filepath, files):
144
- """This function returns the examples in the raw (text) form."""
145
- logger.info("generating examples from = %s", filepath)
146
- for path, f in files:
147
- if path == filepath:
148
- qasper = json.loads(f.read().decode("utf-8"))
149
- for id_ in qasper:
150
- qasper[id_]["id"] = id_
151
- yield id_, qasper[id_]
152
- break
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
qasper/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9a528ef4296b1902f32abee24e2703ae8fd729771641c4e492b3ce465e2071e
3
+ size 7075110
qasper/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6530eb46c6768883502c6c379469e2529589a5c19e0c6dc01e8a0b632b906007
3
+ size 14374787
qasper/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:079fa59f523d1b4c7d441496e00fb4d40eed1103f691d2f7c5b548b3e71719e2
3
+ size 4749368