parquet-converter commited on
Commit
b46a43b
1 Parent(s): 89a6001

Update parquet files

Browse files
README.md DELETED
@@ -1,299 +0,0 @@
1
- ---
2
- language:
3
- - en
4
- paperswithcode_id: null
5
- pretty_name: qangaroo
6
- dataset_info:
7
- - config_name: medhop
8
- features:
9
- - name: query
10
- dtype: string
11
- - name: supports
12
- sequence: string
13
- - name: candidates
14
- sequence: string
15
- - name: answer
16
- dtype: string
17
- - name: id
18
- dtype: string
19
- splits:
20
- - name: train
21
- num_bytes: 93947725
22
- num_examples: 1620
23
- - name: validation
24
- num_bytes: 16463555
25
- num_examples: 342
26
- download_size: 339843061
27
- dataset_size: 110411280
28
- - config_name: masked_medhop
29
- features:
30
- - name: query
31
- dtype: string
32
- - name: supports
33
- sequence: string
34
- - name: candidates
35
- sequence: string
36
- - name: answer
37
- dtype: string
38
- - name: id
39
- dtype: string
40
- splits:
41
- - name: train
42
- num_bytes: 95823986
43
- num_examples: 1620
44
- - name: validation
45
- num_bytes: 16802484
46
- num_examples: 342
47
- download_size: 339843061
48
- dataset_size: 112626470
49
- - config_name: wikihop
50
- features:
51
- - name: query
52
- dtype: string
53
- - name: supports
54
- sequence: string
55
- - name: candidates
56
- sequence: string
57
- - name: answer
58
- dtype: string
59
- - name: id
60
- dtype: string
61
- splits:
62
- - name: train
63
- num_bytes: 325994029
64
- num_examples: 43738
65
- - name: validation
66
- num_bytes: 40869634
67
- num_examples: 5129
68
- download_size: 339843061
69
- dataset_size: 366863663
70
- - config_name: masked_wikihop
71
- features:
72
- - name: query
73
- dtype: string
74
- - name: supports
75
- sequence: string
76
- - name: candidates
77
- sequence: string
78
- - name: answer
79
- dtype: string
80
- - name: id
81
- dtype: string
82
- splits:
83
- - name: train
84
- num_bytes: 348290479
85
- num_examples: 43738
86
- - name: validation
87
- num_bytes: 43689810
88
- num_examples: 5129
89
- download_size: 339843061
90
- dataset_size: 391980289
91
- ---
92
-
93
- # Dataset Card for "qangaroo"
94
-
95
- ## Table of Contents
96
- - [Dataset Description](#dataset-description)
97
- - [Dataset Summary](#dataset-summary)
98
- - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
99
- - [Languages](#languages)
100
- - [Dataset Structure](#dataset-structure)
101
- - [Data Instances](#data-instances)
102
- - [Data Fields](#data-fields)
103
- - [Data Splits](#data-splits)
104
- - [Dataset Creation](#dataset-creation)
105
- - [Curation Rationale](#curation-rationale)
106
- - [Source Data](#source-data)
107
- - [Annotations](#annotations)
108
- - [Personal and Sensitive Information](#personal-and-sensitive-information)
109
- - [Considerations for Using the Data](#considerations-for-using-the-data)
110
- - [Social Impact of Dataset](#social-impact-of-dataset)
111
- - [Discussion of Biases](#discussion-of-biases)
112
- - [Other Known Limitations](#other-known-limitations)
113
- - [Additional Information](#additional-information)
114
- - [Dataset Curators](#dataset-curators)
115
- - [Licensing Information](#licensing-information)
116
- - [Citation Information](#citation-information)
117
- - [Contributions](#contributions)
118
-
119
- ## Dataset Description
120
-
121
- - **Homepage:** [http://qangaroo.cs.ucl.ac.uk/index.html](http://qangaroo.cs.ucl.ac.uk/index.html)
122
- - **Repository:** [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
123
- - **Paper:** [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
124
- - **Point of Contact:** [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
125
- - **Size of downloaded dataset files:** 1296.40 MB
126
- - **Size of the generated dataset:** 936.40 MB
127
- - **Total amount of disk used:** 2232.79 MB
128
-
129
- ### Dataset Summary
130
-
131
- We have created two new Reading Comprehension datasets focussing on multi-hop (alias multi-step) inference.
132
-
133
- Several pieces of information often jointly imply another fact. In multi-hop inference, a new fact is derived by combining facts via a chain of multiple steps.
134
-
135
- Our aim is to build Reading Comprehension methods that perform multi-hop inference on text, where individual facts are spread out across different documents.
136
-
137
- The two QAngaroo datasets provide a training and evaluation resource for such methods.
138
-
139
- ### Supported Tasks and Leaderboards
140
-
141
- [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
142
-
143
- ### Languages
144
-
145
- [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
146
-
147
- ## Dataset Structure
148
-
149
- ### Data Instances
150
-
151
- #### masked_medhop
152
-
153
- - **Size of downloaded dataset files:** 324.10 MB
154
- - **Size of the generated dataset:** 107.41 MB
155
- - **Total amount of disk used:** 431.51 MB
156
-
157
- An example of 'validation' looks as follows.
158
- ```
159
-
160
- ```
161
-
162
- #### masked_wikihop
163
-
164
- - **Size of downloaded dataset files:** 324.10 MB
165
- - **Size of the generated dataset:** 373.82 MB
166
- - **Total amount of disk used:** 697.92 MB
167
-
168
- An example of 'validation' looks as follows.
169
- ```
170
-
171
- ```
172
-
173
- #### medhop
174
-
175
- - **Size of downloaded dataset files:** 324.10 MB
176
- - **Size of the generated dataset:** 105.30 MB
177
- - **Total amount of disk used:** 429.40 MB
178
-
179
- An example of 'validation' looks as follows.
180
- ```
181
-
182
- ```
183
-
184
- #### wikihop
185
-
186
- - **Size of downloaded dataset files:** 324.10 MB
187
- - **Size of the generated dataset:** 349.87 MB
188
- - **Total amount of disk used:** 673.97 MB
189
-
190
- An example of 'validation' looks as follows.
191
- ```
192
-
193
- ```
194
-
195
- ### Data Fields
196
-
197
- The data fields are the same among all splits.
198
-
199
- #### masked_medhop
200
- - `query`: a `string` feature.
201
- - `supports`: a `list` of `string` features.
202
- - `candidates`: a `list` of `string` features.
203
- - `answer`: a `string` feature.
204
- - `id`: a `string` feature.
205
-
206
- #### masked_wikihop
207
- - `query`: a `string` feature.
208
- - `supports`: a `list` of `string` features.
209
- - `candidates`: a `list` of `string` features.
210
- - `answer`: a `string` feature.
211
- - `id`: a `string` feature.
212
-
213
- #### medhop
214
- - `query`: a `string` feature.
215
- - `supports`: a `list` of `string` features.
216
- - `candidates`: a `list` of `string` features.
217
- - `answer`: a `string` feature.
218
- - `id`: a `string` feature.
219
-
220
- #### wikihop
221
- - `query`: a `string` feature.
222
- - `supports`: a `list` of `string` features.
223
- - `candidates`: a `list` of `string` features.
224
- - `answer`: a `string` feature.
225
- - `id`: a `string` feature.
226
-
227
- ### Data Splits
228
-
229
- | name |train|validation|
230
- |--------------|----:|---------:|
231
- |masked_medhop | 1620| 342|
232
- |masked_wikihop|43738| 5129|
233
- |medhop | 1620| 342|
234
- |wikihop |43738| 5129|
235
-
236
- ## Dataset Creation
237
-
238
- ### Curation Rationale
239
-
240
- [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
241
-
242
- ### Source Data
243
-
244
- #### Initial Data Collection and Normalization
245
-
246
- [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
247
-
248
- #### Who are the source language producers?
249
-
250
- [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
251
-
252
- ### Annotations
253
-
254
- #### Annotation process
255
-
256
- [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
257
-
258
- #### Who are the annotators?
259
-
260
- [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
261
-
262
- ### Personal and Sensitive Information
263
-
264
- [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
265
-
266
- ## Considerations for Using the Data
267
-
268
- ### Social Impact of Dataset
269
-
270
- [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
271
-
272
- ### Discussion of Biases
273
-
274
- [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
275
-
276
- ### Other Known Limitations
277
-
278
- [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
279
-
280
- ## Additional Information
281
-
282
- ### Dataset Curators
283
-
284
- [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
285
-
286
- ### Licensing Information
287
-
288
- [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
289
-
290
- ### Citation Information
291
-
292
- ```
293
-
294
- ```
295
-
296
-
297
- ### Contributions
298
-
299
- Thanks to [@thomwolf](https://github.com/thomwolf), [@jplu](https://github.com/jplu), [@lewtun](https://github.com/lewtun), [@lhoestq](https://github.com/lhoestq), [@mariamabarham](https://github.com/mariamabarham) for adding this dataset.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"medhop": {"description": " We have created two new Reading Comprehension datasets focussing on multi-hop (alias multi-step) inference.\n\nSeveral pieces of information often jointly imply another fact. In multi-hop inference, a new fact is derived by combining facts via a chain of multiple steps.\n\nOur aim is to build Reading Comprehension methods that perform multi-hop inference on text, where individual facts are spread out across different documents.\n\nThe two QAngaroo datasets provide a training and evaluation resource for such methods.\n", "citation": "\n", "homepage": "http://qangaroo.cs.ucl.ac.uk/index.html", "license": "", "features": {"query": {"dtype": "string", "id": null, "_type": "Value"}, "supports": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "candidates": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "answer": {"dtype": "string", "id": null, "_type": "Value"}, "id": {"dtype": "string", "id": null, "_type": "Value"}}, "supervised_keys": null, "builder_name": "qangaroo", "config_name": "medhop", "version": {"version_str": "1.0.0", "description": "", "datasets_version_to_prepare": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 93947725, "num_examples": 1620, "dataset_name": "qangaroo"}, "validation": {"name": "validation", "num_bytes": 16463555, "num_examples": 342, "dataset_name": "qangaroo"}}, "download_checksums": {"https://drive.google.com/uc?export=download&id=1ytVZ4AhubFDOEL7o7XrIRIyhU8g9wvKA": {"num_bytes": 339843061, "checksum": "2f512869760cdad76a022a1465f025b486ae79dc5b8f0bf3ad901a4caf2d3050"}}, "download_size": 339843061, "dataset_size": 110411280, "size_in_bytes": 450254341}, "masked_medhop": {"description": " We have created two new Reading Comprehension datasets focussing on multi-hop (alias multi-step) inference.\n\nSeveral pieces of information often jointly imply another fact. In multi-hop inference, a new fact is derived by combining facts via a chain of multiple steps.\n\nOur aim is to build Reading Comprehension methods that perform multi-hop inference on text, where individual facts are spread out across different documents.\n\nThe two QAngaroo datasets provide a training and evaluation resource for such methods.\n", "citation": "\n", "homepage": "http://qangaroo.cs.ucl.ac.uk/index.html", "license": "", "features": {"query": {"dtype": "string", "id": null, "_type": "Value"}, "supports": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "candidates": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "answer": {"dtype": "string", "id": null, "_type": "Value"}, "id": {"dtype": "string", "id": null, "_type": "Value"}}, "supervised_keys": null, "builder_name": "qangaroo", "config_name": "masked_medhop", "version": {"version_str": "1.0.0", "description": "", "datasets_version_to_prepare": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 95823986, "num_examples": 1620, "dataset_name": "qangaroo"}, "validation": {"name": "validation", "num_bytes": 16802484, "num_examples": 342, "dataset_name": "qangaroo"}}, "download_checksums": {"https://drive.google.com/uc?export=download&id=1ytVZ4AhubFDOEL7o7XrIRIyhU8g9wvKA": {"num_bytes": 339843061, "checksum": "2f512869760cdad76a022a1465f025b486ae79dc5b8f0bf3ad901a4caf2d3050"}}, "download_size": 339843061, "dataset_size": 112626470, "size_in_bytes": 452469531}, "wikihop": {"description": " We have created two new Reading Comprehension datasets focussing on multi-hop (alias multi-step) inference.\n\nSeveral pieces of information often jointly imply another fact. In multi-hop inference, a new fact is derived by combining facts via a chain of multiple steps.\n\nOur aim is to build Reading Comprehension methods that perform multi-hop inference on text, where individual facts are spread out across different documents.\n\nThe two QAngaroo datasets provide a training and evaluation resource for such methods.\n", "citation": "\n", "homepage": "http://qangaroo.cs.ucl.ac.uk/index.html", "license": "", "features": {"query": {"dtype": "string", "id": null, "_type": "Value"}, "supports": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "candidates": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "answer": {"dtype": "string", "id": null, "_type": "Value"}, "id": {"dtype": "string", "id": null, "_type": "Value"}}, "supervised_keys": null, "builder_name": "qangaroo", "config_name": "wikihop", "version": {"version_str": "1.0.0", "description": "", "datasets_version_to_prepare": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 325994029, "num_examples": 43738, "dataset_name": "qangaroo"}, "validation": {"name": "validation", "num_bytes": 40869634, "num_examples": 5129, "dataset_name": "qangaroo"}}, "download_checksums": {"https://drive.google.com/uc?export=download&id=1ytVZ4AhubFDOEL7o7XrIRIyhU8g9wvKA": {"num_bytes": 339843061, "checksum": "2f512869760cdad76a022a1465f025b486ae79dc5b8f0bf3ad901a4caf2d3050"}}, "download_size": 339843061, "dataset_size": 366863663, "size_in_bytes": 706706724}, "masked_wikihop": {"description": " We have created two new Reading Comprehension datasets focussing on multi-hop (alias multi-step) inference.\n\nSeveral pieces of information often jointly imply another fact. In multi-hop inference, a new fact is derived by combining facts via a chain of multiple steps.\n\nOur aim is to build Reading Comprehension methods that perform multi-hop inference on text, where individual facts are spread out across different documents.\n\nThe two QAngaroo datasets provide a training and evaluation resource for such methods.\n", "citation": "\n", "homepage": "http://qangaroo.cs.ucl.ac.uk/index.html", "license": "", "features": {"query": {"dtype": "string", "id": null, "_type": "Value"}, "supports": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "candidates": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "answer": {"dtype": "string", "id": null, "_type": "Value"}, "id": {"dtype": "string", "id": null, "_type": "Value"}}, "supervised_keys": null, "builder_name": "qangaroo", "config_name": "masked_wikihop", "version": {"version_str": "1.0.0", "description": "", "datasets_version_to_prepare": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 348290479, "num_examples": 43738, "dataset_name": "qangaroo"}, "validation": {"name": "validation", "num_bytes": 43689810, "num_examples": 5129, "dataset_name": "qangaroo"}}, "download_checksums": {"https://drive.google.com/uc?export=download&id=1ytVZ4AhubFDOEL7o7XrIRIyhU8g9wvKA": {"num_bytes": 339843061, "checksum": "2f512869760cdad76a022a1465f025b486ae79dc5b8f0bf3ad901a4caf2d3050"}}, "download_size": 339843061, "dataset_size": 391980289, "size_in_bytes": 731823350}}
 
 
masked_medhop/qangaroo-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0fc78c9efde7e04dd1e51971fa46206c4af0b4562afe93ccc6821843e6383134
3
+ size 50027281
masked_medhop/qangaroo-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bcad8391cee468ea1fd01c421b12aa56cb3b8b8bd15036cbc3a1d95598d88033
3
+ size 8774398
masked_wikihop/qangaroo-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9483f7454f2a090890a98c425c60300758e77ea7a288ffcb1d558bec6251d468
3
+ size 187715934
masked_wikihop/qangaroo-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7eb5d8bf876bdf6b529807189988a461767e68af6f9e028f1b234f6c4fbcf3f6
3
+ size 23586547
medhop/qangaroo-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:377d3aacb4ffa3455b4f427041b7d430159d87d22f98a64be938e0ac2b19271d
3
+ size 49190500
medhop/qangaroo-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e25d92075881443ef9d219aba6062141d9825979150fff1cdab7cd06e475e48e
3
+ size 8647216
qangaroo.py DELETED
@@ -1,126 +0,0 @@
1
- """TODO(qangaroo): Add a description here."""
2
-
3
-
4
- import json
5
- import os
6
-
7
- import datasets
8
-
9
-
10
- # TODO(qangaroo): BibTeX citation
11
-
12
- _CITATION = """
13
- """
14
-
15
- # TODO(quangaroo):
16
- _DESCRIPTION = """\
17
- We have created two new Reading Comprehension datasets focussing on multi-hop (alias multi-step) inference.
18
-
19
- Several pieces of information often jointly imply another fact. In multi-hop inference, a new fact is derived by combining facts via a chain of multiple steps.
20
-
21
- Our aim is to build Reading Comprehension methods that perform multi-hop inference on text, where individual facts are spread out across different documents.
22
-
23
- The two QAngaroo datasets provide a training and evaluation resource for such methods.
24
- """
25
-
26
- _MEDHOP_DESCRIPTION = """\
27
- With the same format as WikiHop, this dataset is based on research paper abstracts from PubMed, and the queries are about interactions between pairs of drugs.
28
- The correct answer has to be inferred by combining information from a chain of reactions of drugs and proteins.
29
- """
30
- _WIKIHOP_DESCRIPTION = """\
31
- With the same format as WikiHop, this dataset is based on research paper abstracts from PubMed, and the queries are about interactions between pairs of drugs.
32
- The correct answer has to be inferred by combining information from a chain of reactions of drugs and proteins.
33
- """
34
-
35
- _URL = "https://drive.google.com/uc?export=download&id=1ytVZ4AhubFDOEL7o7XrIRIyhU8g9wvKA"
36
-
37
-
38
- class QangarooConfig(datasets.BuilderConfig):
39
- def __init__(self, data_dir, **kwargs):
40
- """BuilderConfig for qangaroo dataset
41
-
42
- Args:
43
- data_dir: directory for the given dataset name
44
- **kwargs: keyword arguments forwarded to super.
45
-
46
- """
47
-
48
- super(QangarooConfig, self).__init__(version=datasets.Version("1.0.0", ""), **kwargs)
49
-
50
- self.data_dir = data_dir
51
-
52
-
53
- class Qangaroo(datasets.GeneratorBasedBuilder):
54
- """TODO(qangaroo): Short description of my dataset."""
55
-
56
- # TODO(qangaroo): Set up version.
57
- VERSION = datasets.Version("0.1.0")
58
- BUILDER_CONFIGS = [
59
- QangarooConfig(name="medhop", description=_MEDHOP_DESCRIPTION, data_dir="medhop"),
60
- QangarooConfig(name="masked_medhop", description=_MEDHOP_DESCRIPTION, data_dir="medhop"),
61
- QangarooConfig(name="wikihop", description=_WIKIHOP_DESCRIPTION, data_dir="wikihop"),
62
- QangarooConfig(name="masked_wikihop", description=_WIKIHOP_DESCRIPTION, data_dir="wikihop"),
63
- ]
64
-
65
- def _info(self):
66
- # TODO(qangaroo): Specifies the datasets.DatasetInfo object
67
- return datasets.DatasetInfo(
68
- # This is the description that will appear on the datasets page.
69
- description=_DESCRIPTION,
70
- # datasets.features.FeatureConnectors
71
- features=datasets.Features(
72
- {
73
- # These are the features of your dataset like images, labels ...
74
- "query": datasets.Value("string"),
75
- "supports": datasets.features.Sequence(datasets.Value("string")),
76
- "candidates": datasets.features.Sequence(datasets.Value("string")),
77
- "answer": datasets.Value("string"),
78
- "id": datasets.Value("string")
79
- # These are the features of your dataset like images, labels ...
80
- }
81
- ),
82
- # If there's a common (input, target) tuple from the features,
83
- # specify them here. They'll be used if as_supervised=True in
84
- # builder.as_dataset.
85
- supervised_keys=None,
86
- # Homepage of the dataset for documentation
87
- homepage="http://qangaroo.cs.ucl.ac.uk/index.html",
88
- citation=_CITATION,
89
- )
90
-
91
- def _split_generators(self, dl_manager):
92
- """Returns SplitGenerators."""
93
- # TODO(qangaroo): Downloads the data and defines the splits
94
- # dl_manager is a datasets.download.DownloadManager that can be used to
95
- # download and extract URLs
96
- dl_dir = dl_manager.download_and_extract(_URL)
97
- data_dir = os.path.join(dl_dir, "qangaroo_v1.1")
98
- train_file = "train.masked.json" if "masked" in self.config.name else "train.json"
99
- dev_file = "dev.masked.json" if "masked" in self.config.name else "dev.json"
100
- return [
101
- datasets.SplitGenerator(
102
- name=datasets.Split.TRAIN,
103
- # These kwargs will be passed to _generate_examples
104
- gen_kwargs={"filepath": os.path.join(data_dir, self.config.data_dir, train_file)},
105
- ),
106
- datasets.SplitGenerator(
107
- name=datasets.Split.VALIDATION,
108
- # These kwargs will be passed to _generate_examples
109
- gen_kwargs={"filepath": os.path.join(data_dir, self.config.data_dir, dev_file)},
110
- ),
111
- ]
112
-
113
- def _generate_examples(self, filepath):
114
- """Yields examples."""
115
- # TODO(quangaroo): Yields (key, example) tuples from the dataset
116
- with open(filepath, encoding="utf-8") as f:
117
- data = json.load(f)
118
- for example in data:
119
- id_ = example["id"]
120
- yield id_, {
121
- "id": example["id"],
122
- "query": example["query"],
123
- "supports": example["supports"],
124
- "candidates": example["candidates"],
125
- "answer": example["answer"],
126
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wikihop/qangaroo-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:779c4627f6db8ece7bfe2828562725372ad0d09b8375b07cd2fc07b24a18f543
3
+ size 179875980
wikihop/qangaroo-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ae702f97333d4d81035543074f1743bf775bb324f38400753bd720d9968e18c1
3
+ size 22578466