parquet-converter commited on
Commit
39c8cee
1 Parent(s): 744816f

Update parquet files

Browse files
.gitattributes DELETED
@@ -1,27 +0,0 @@
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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ParaphraseRC/duorc-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:959f5877354069ce0e60a54d8e842eb968a3fb63de7f428581bdf8e07cb42d64
3
+ size 6136590
ParaphraseRC/duorc-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e168cc3fc13c1ee49786a254ebb24a7cccbab1ca75acdd7b3b2de7c7975b3f22
3
+ size 26005667
ParaphraseRC/duorc-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:410c5df2ea86e332c8e7e949d25ea5c7d6201afacd3815af21f7b92845b5e101
3
+ size 5566867
README.md DELETED
@@ -1,231 +0,0 @@
1
- ---
2
- annotations_creators:
3
- - crowdsourced
4
- language_creators:
5
- - crowdsourced
6
- language:
7
- - en
8
- license:
9
- - mit
10
- multilinguality:
11
- - monolingual
12
- size_categories:
13
- - 100K<n<1M
14
- - 10K<n<100K
15
- source_datasets:
16
- - original
17
- task_categories:
18
- - question-answering
19
- - text2text-generation
20
- task_ids:
21
- - abstractive-qa
22
- - extractive-qa
23
- paperswithcode_id: duorc
24
- pretty_name: DuoRC
25
- configs:
26
- - ParaphraseRC
27
- - SelfRC
28
- dataset_info:
29
- - config_name: SelfRC
30
- features:
31
- - name: plot_id
32
- dtype: string
33
- - name: plot
34
- dtype: string
35
- - name: title
36
- dtype: string
37
- - name: question_id
38
- dtype: string
39
- - name: question
40
- dtype: string
41
- - name: answers
42
- sequence: string
43
- - name: no_answer
44
- dtype: bool
45
- splits:
46
- - name: train
47
- num_bytes: 239852925
48
- num_examples: 60721
49
- - name: validation
50
- num_bytes: 51662575
51
- num_examples: 12961
52
- - name: test
53
- num_bytes: 49142766
54
- num_examples: 12559
55
- download_size: 34462660
56
- dataset_size: 340658266
57
- - config_name: ParaphraseRC
58
- features:
59
- - name: plot_id
60
- dtype: string
61
- - name: plot
62
- dtype: string
63
- - name: title
64
- dtype: string
65
- - name: question_id
66
- dtype: string
67
- - name: question
68
- dtype: string
69
- - name: answers
70
- sequence: string
71
- - name: no_answer
72
- dtype: bool
73
- splits:
74
- - name: train
75
- num_bytes: 496683105
76
- num_examples: 69524
77
- - name: validation
78
- num_bytes: 106510545
79
- num_examples: 15591
80
- - name: test
81
- num_bytes: 115215816
82
- num_examples: 15857
83
- download_size: 62921050
84
- dataset_size: 718409466
85
- ---
86
-
87
- # Dataset Card for duorc
88
-
89
- ## Table of Contents
90
- - [Dataset Description](#dataset-description)
91
- - [Dataset Summary](#dataset-summary)
92
- - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
93
- - [Languages](#languages)
94
- - [Dataset Structure](#dataset-structure)
95
- - [Data Instances](#data-instances)
96
- - [Data Fields](#data-fields)
97
- - [Data Splits](#data-splits)
98
- - [Dataset Creation](#dataset-creation)
99
- - [Curation Rationale](#curation-rationale)
100
- - [Source Data](#source-data)
101
- - [Annotations](#annotations)
102
- - [Personal and Sensitive Information](#personal-and-sensitive-information)
103
- - [Considerations for Using the Data](#considerations-for-using-the-data)
104
- - [Social Impact of Dataset](#social-impact-of-dataset)
105
- - [Discussion of Biases](#discussion-of-biases)
106
- - [Other Known Limitations](#other-known-limitations)
107
- - [Additional Information](#additional-information)
108
- - [Dataset Curators](#dataset-curators)
109
- - [Licensing Information](#licensing-information)
110
- - [Citation Information](#citation-information)
111
- - [Contributions](#contributions)
112
-
113
- ## Dataset Description
114
-
115
- - **Homepage:** [DuoRC](https://duorc.github.io/)
116
- - **Repository:** [GitHub](https://github.com/duorc/duorc)
117
- - **Paper:** [arXiv](https://arxiv.org/abs/1804.07927)
118
- - **Leaderboard:** [DuoRC Leaderboard](https://duorc.github.io/#leaderboard)
119
- - **Point of Contact:** [Needs More Information]
120
-
121
- ### Dataset Summary
122
-
123
- The DuoRC dataset is an English language dataset of questions and answers gathered from crowdsourced AMT workers on Wikipedia and IMDb movie plots. The workers were given freedom to pick answer from the plots or synthesize their own answers. It contains two sub-datasets - SelfRC and ParaphraseRC. SelfRC dataset is built on Wikipedia movie plots solely. ParaphraseRC has questions written from Wikipedia movie plots and the answers are given based on corresponding IMDb movie plots.
124
-
125
- ### Supported Tasks and Leaderboards
126
-
127
- - `abstractive-qa` : The dataset can be used to train a model for Abstractive Question Answering. An abstractive question answering model is presented with a passage and a question and is expected to generate a multi-word answer. The model performance is measured by exact-match and F1 score, similar to [SQuAD V1.1](https://huggingface.co/metrics/squad) or [SQuAD V2](https://huggingface.co/metrics/squad_v2). A [BART-based model](https://huggingface.co/yjernite/bart_eli5) with a [dense retriever](https://huggingface.co/yjernite/retribert-base-uncased) may be used for this task.
128
-
129
- - `extractive-qa`: The dataset can be used to train a model for Extractive Question Answering. An extractive question answering model is presented with a passage and a question and is expected to predict the start and end of the answer span in the passage. The model performance is measured by exact-match and F1 score, similar to [SQuAD V1.1](https://huggingface.co/metrics/squad) or [SQuAD V2](https://huggingface.co/metrics/squad_v2). [BertForQuestionAnswering](https://huggingface.co/transformers/model_doc/bert.html#bertforquestionanswering) or any other similar model may be used for this task.
130
-
131
- ### Languages
132
-
133
- The text in the dataset is in English, as spoken by Wikipedia writers for movie plots. The associated BCP-47 code is `en`.
134
-
135
- ## Dataset Structure
136
-
137
- ### Data Instances
138
-
139
- ```
140
- {'answers': ['They arrived by train.'], 'no_answer': False, 'plot': "200 years in the future, Mars has been colonized by a high-tech company.\nMelanie Ballard (Natasha Henstridge) arrives by train to a Mars mining camp which has cut all communication links with the company headquarters. She's not alone, as she is with a group of fellow police officers. They find the mining camp deserted except for a person in the prison, Desolation Williams (Ice Cube), who seems to laugh about them because they are all going to die. They were supposed to take Desolation to headquarters, but decide to explore first to find out what happened.They find a man inside an encapsulated mining car, who tells them not to open it. However, they do and he tries to kill them. One of the cops witnesses strange men with deep scarred and heavily tattooed faces killing the remaining survivors. The cops realise they need to leave the place fast.Desolation explains that the miners opened a kind of Martian construction in the soil which unleashed red dust. Those who breathed that dust became violent psychopaths who started to build weapons and kill the uninfected. They changed genetically, becoming distorted but much stronger.The cops and Desolation leave the prison with difficulty, and devise a plan to kill all the genetically modified ex-miners on the way out. However, the plan goes awry, and only Melanie and Desolation reach headquarters alive. Melanie realises that her bosses won't ever believe her. However, the red dust eventually arrives to headquarters, and Melanie and Desolation need to fight once again.", 'plot_id': '/m/03vyhn', 'question': 'How did the police arrive at the Mars mining camp?', 'question_id': 'b440de7d-9c3f-841c-eaec-a14bdff950d1', 'title': 'Ghosts of Mars'}
141
- ```
142
-
143
- ### Data Fields
144
-
145
- - `plot_id`: a `string` feature containing the movie plot ID.
146
- - `plot`: a `string` feature containing the movie plot text.
147
- - `title`: a `string` feature containing the movie title.
148
- - `question_id`: a `string` feature containing the question ID.
149
- - `question`: a `string` feature containing the question text.
150
- - `answers`: a `list` of `string` features containing list of answers.
151
- - `no_answer`: a `bool` feature informing whether the question has no answer or not.
152
-
153
-
154
- ### Data Splits
155
-
156
- The data is split into a training, dev and test set in such a way that the resulting sets contain 70%, 15%, and 15% of the total QA pairs and no QA pairs for any movie seen in train are included in the test set. The final split sizes are as follows:
157
-
158
- Name Train Dec Test
159
- SelfRC 60721 12961 12599
160
- ParaphraseRC 69524 15591 15857
161
- ## Dataset Creation
162
-
163
- ### Curation Rationale
164
-
165
- [Needs More Information]
166
-
167
- ### Source Data
168
-
169
- Wikipedia and IMDb movie plots
170
-
171
- #### Initial Data Collection and Normalization
172
-
173
- [Needs More Information]
174
-
175
- #### Who are the source language producers?
176
-
177
- [Needs More Information]
178
-
179
- ### Annotations
180
-
181
- #### Annotation process
182
-
183
- For SelfRC, the annotators were allowed to mark an answer span in the plot or synthesize their own answers after reading Wikipedia movie plots.
184
- For ParaphraseRC, questions from the Wikipedia movie plots from SelfRC were used and the annotators were asked to answer based on IMDb movie plots.
185
-
186
- #### Who are the annotators?
187
-
188
- Amazon Mechanical Turk Workers
189
-
190
- ### Personal and Sensitive Information
191
-
192
- [Needs More Information]
193
-
194
- ## Considerations for Using the Data
195
-
196
- ### Social Impact of Dataset
197
-
198
- [Needs More Information]
199
-
200
- ### Discussion of Biases
201
-
202
- [Needs More Information]
203
-
204
- ### Other Known Limitations
205
-
206
- [Needs More Information]
207
-
208
- ## Additional Information
209
-
210
- ### Dataset Curators
211
-
212
- The dataset was intially created by Amrita Saha, Rahul Aralikatte, Mitesh M. Khapra, and Karthik Sankaranarayanan in a collaborated work between IIT Madras and IBM Research.
213
-
214
- ### Licensing Information
215
-
216
- [MIT License](https://github.com/duorc/duorc/blob/master/LICENSE)
217
-
218
- ### Citation Information
219
-
220
- ```
221
- @inproceedings{DuoRC,
222
- author = { Amrita Saha and Rahul Aralikatte and Mitesh M. Khapra and Karthik Sankaranarayanan},
223
- title = {{DuoRC: Towards Complex Language Understanding with Paraphrased Reading Comprehension}},
224
- booktitle = {Meeting of the Association for Computational Linguistics (ACL)},
225
- year = {2018}
226
- }
227
- ```
228
-
229
- ### Contributions
230
-
231
- Thanks to [@gchhablani](https://github.com/gchhablani) for adding this dataset.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
SelfRC/duorc-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ac0273c23d4ac7e47455f74d9a6857d71cd13768b2b3f9644308e21b8d3e140
3
+ size 3035735
SelfRC/duorc-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:75c9db7d91b9a812e08bbb8f06a259476a9248190dc0530ffe5f765b34f20935
3
+ size 14851719
SelfRC/duorc-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9a46474172677057ffc834d44bc5c1b8cd6627917f54cf1f7f5da61282e2b3e4
3
+ size 3114389
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"SelfRC": {"description": "DuoRC contains 186,089 unique question-answer pairs created from a collection of 7680 pairs of movie plots where each pair in the collection reflects two versions of the same movie.\n", "citation": "@inproceedings{DuoRC,\nauthor = { Amrita Saha and Rahul Aralikatte and Mitesh M. Khapra and Karthik Sankaranarayanan},title = {{DuoRC: Towards Complex Language Understanding with Paraphrased Reading Comprehension}},\nbooktitle = {Meeting of the Association for Computational Linguistics (ACL)},\nyear = {2018}\n}\n", "homepage": "https://duorc.github.io/", "license": "https://raw.githubusercontent.com/duorc/duorc/master/LICENSE", "features": {"plot_id": {"dtype": "string", "id": null, "_type": "Value"}, "plot": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "question_id": {"dtype": "string", "id": null, "_type": "Value"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "answers": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "no_answer": {"dtype": "bool", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "duorc", "config_name": "SelfRC", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 239852925, "num_examples": 60721, "dataset_name": "duorc"}, "validation": {"name": "validation", "num_bytes": 51662575, "num_examples": 12961, "dataset_name": "duorc"}, "test": {"name": "test", "num_bytes": 49142766, "num_examples": 12559, "dataset_name": "duorc"}}, "download_checksums": {"https://raw.githubusercontent.com/duorc/duorc/master/dataset/SelfRC_train.json": {"num_bytes": 24388192, "checksum": "38c9dd56f3f0debc5d86ac9eadc42ab06e3bf4095feb0f7dd2c968a1555d774e"}, "https://raw.githubusercontent.com/duorc/duorc/master/dataset/SelfRC_dev.json": {"num_bytes": 5051240, "checksum": "003bc7f551041cbdbc433276cffbebf02a743d58e7d295b990c66bb643c75ffa"}, "https://raw.githubusercontent.com/duorc/duorc/master/dataset/SelfRC_test.json": {"num_bytes": 5023228, "checksum": "3372be8248a9dba7455eb22ff035378b40bf125cf8ae1409d9affebb4d2fe96f"}}, "download_size": 34462660, "post_processing_size": null, "dataset_size": 340658266, "size_in_bytes": 375120926}, "ParaphraseRC": {"description": "DuoRC contains 186,089 unique question-answer pairs created from a collection of 7680 pairs of movie plots where each pair in the collection reflects two versions of the same movie.\n", "citation": "@inproceedings{DuoRC,\nauthor = { Amrita Saha and Rahul Aralikatte and Mitesh M. Khapra and Karthik Sankaranarayanan},title = {{DuoRC: Towards Complex Language Understanding with Paraphrased Reading Comprehension}},\nbooktitle = {Meeting of the Association for Computational Linguistics (ACL)},\nyear = {2018}\n}\n", "homepage": "https://duorc.github.io/", "license": "https://raw.githubusercontent.com/duorc/duorc/master/LICENSE", "features": {"plot_id": {"dtype": "string", "id": null, "_type": "Value"}, "plot": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "question_id": {"dtype": "string", "id": null, "_type": "Value"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "answers": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "no_answer": {"dtype": "bool", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "duorc", "config_name": "ParaphraseRC", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 496683105, "num_examples": 69524, "dataset_name": "duorc"}, "validation": {"name": "validation", "num_bytes": 106510545, "num_examples": 15591, "dataset_name": "duorc"}, "test": {"name": "test", "num_bytes": 115215816, "num_examples": 15857, "dataset_name": "duorc"}}, "download_checksums": {"https://raw.githubusercontent.com/duorc/duorc/master/dataset/ParaphraseRC_train.json": {"num_bytes": 43374860, "checksum": "8a22500def833cf33a4eaaf7c00b5fc144b5fe26d40e6d94a96bd23a88056193"}, "https://raw.githubusercontent.com/duorc/duorc/master/dataset/ParaphraseRC_dev.json": {"num_bytes": 9319561, "checksum": "6d49a1ace1cebe7c73063551e91548725c75db505e1ada58af81c0e1dd21fe60"}, "https://raw.githubusercontent.com/duorc/duorc/master/dataset/ParaphraseRC_test.json": {"num_bytes": 10226629, "checksum": "98e471e3b8203664b1656f19fd22d50c3e8ec4e84792846ccf1ccbf0c1298799"}}, "download_size": 62921050, "post_processing_size": null, "dataset_size": 718409466, "size_in_bytes": 781330516}}
 
 
duorc.py DELETED
@@ -1,146 +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
- """DuoRC: A Paraphrased
16
- Reading Comprehension Question Answering Dataset"""
17
-
18
-
19
- import json
20
-
21
- import datasets
22
-
23
-
24
- _CITATION = """\
25
- @inproceedings{DuoRC,
26
- author = { Amrita Saha and Rahul Aralikatte and Mitesh M. Khapra and Karthik Sankaranarayanan},\
27
- title = {{DuoRC: Towards Complex Language Understanding with Paraphrased Reading Comprehension}},
28
- booktitle = {Meeting of the Association for Computational Linguistics (ACL)},
29
- year = {2018}
30
- }
31
- """
32
-
33
-
34
- _DESCRIPTION = """\
35
- DuoRC contains 186,089 unique question-answer pairs created from a collection of 7680 pairs of movie plots where each pair in the collection reflects two versions of the same movie.
36
- """
37
-
38
- _HOMEPAGE = "https://duorc.github.io/"
39
-
40
- _LICENSE = "https://raw.githubusercontent.com/duorc/duorc/master/LICENSE"
41
-
42
- _URL = "https://raw.githubusercontent.com/duorc/duorc/master/dataset/"
43
- _URLs = {
44
- "SelfRC": {
45
- "train": _URL + "SelfRC_train.json",
46
- "dev": _URL + "SelfRC_dev.json",
47
- "test": _URL + "SelfRC_test.json",
48
- },
49
- "ParaphraseRC": {
50
- "train": _URL + "ParaphraseRC_train.json",
51
- "dev": _URL + "ParaphraseRC_dev.json",
52
- "test": _URL + "ParaphraseRC_test.json",
53
- },
54
- }
55
-
56
-
57
- class DuorcConfig(datasets.BuilderConfig):
58
- """BuilderConfig for DuoRC SelfRC."""
59
-
60
- def __init__(self, **kwargs):
61
- """BuilderConfig for DuoRC SelfRC.
62
- Args:
63
- **kwargs: keyword arguments forwarded to super.
64
- """
65
- super(DuorcConfig, self).__init__(**kwargs)
66
-
67
-
68
- class Duorc(datasets.GeneratorBasedBuilder):
69
- """DuoRC Dataset"""
70
-
71
- VERSION = datasets.Version("1.0.0")
72
- BUILDER_CONFIGS = [
73
- DuorcConfig(name="SelfRC", version=VERSION, description="SelfRC dataset"),
74
- DuorcConfig(name="ParaphraseRC", version=VERSION, description="ParaphraseRC dataset"),
75
- ]
76
-
77
- def _info(self):
78
- return datasets.DatasetInfo(
79
- # This is the description that will appear on the datasets page.
80
- description=_DESCRIPTION,
81
- # This defines the different columns of the dataset and their types
82
- features=datasets.Features(
83
- {
84
- "plot_id": datasets.Value("string"),
85
- "plot": datasets.Value("string"),
86
- "title": datasets.Value("string"),
87
- "question_id": datasets.Value("string"),
88
- "question": datasets.Value("string"),
89
- "answers": datasets.features.Sequence(datasets.Value("string")),
90
- "no_answer": datasets.Value("bool"),
91
- }
92
- ),
93
- supervised_keys=None,
94
- homepage=_HOMEPAGE,
95
- license=_LICENSE,
96
- citation=_CITATION,
97
- )
98
-
99
- def _split_generators(self, dl_manager):
100
- """Returns SplitGenerators."""
101
- my_urls = _URLs[self.config.name]
102
- downloaded_files = dl_manager.download_and_extract(my_urls)
103
- return [
104
- datasets.SplitGenerator(
105
- name=datasets.Split.TRAIN,
106
- gen_kwargs={
107
- "filepath": downloaded_files["train"],
108
- },
109
- ),
110
- datasets.SplitGenerator(
111
- name=datasets.Split.VALIDATION,
112
- gen_kwargs={
113
- "filepath": downloaded_files["dev"],
114
- },
115
- ),
116
- datasets.SplitGenerator(
117
- name=datasets.Split.TEST,
118
- gen_kwargs={
119
- "filepath": downloaded_files["test"],
120
- },
121
- ),
122
- ]
123
-
124
- def _generate_examples(self, filepath):
125
- """This function returns the examples in the raw (text) form."""
126
- with open(filepath, encoding="utf-8") as f:
127
- duorc = json.load(f)
128
- for example in duorc:
129
- plot_id = example["id"]
130
- plot = example["plot"].strip()
131
- title = example["title"].strip()
132
- for qas in example["qa"]:
133
- question_id = qas["id"]
134
- question = qas["question"].strip()
135
- answers = [answer.strip() for answer in qas["answers"]]
136
- no_answer = qas["no_answer"]
137
-
138
- yield question_id, {
139
- "title": title,
140
- "plot": plot,
141
- "question": question,
142
- "plot_id": plot_id,
143
- "question_id": question_id,
144
- "answers": answers,
145
- "no_answer": no_answer,
146
- }