system HF staff commited on
Commit
03b2ffb
0 Parent(s):

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.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
README.md ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - crowdsourced
4
+ language_creators:
5
+ - crowdsourced
6
+ - found
7
+ languages:
8
+ - en
9
+ licenses:
10
+ - mit
11
+ multilinguality:
12
+ - monolingual
13
+ size_categories:
14
+ - 10K<n<100K
15
+ source_datasets:
16
+ - extended|wikipedia
17
+ task_categories:
18
+ - question-answering
19
+ - sequence-modeling
20
+ task_ids:
21
+ - dialogue-modeling
22
+ - extractive-qa
23
+ ---
24
+
25
+ # Dataset Card Creation Guide
26
+
27
+ ## Table of Contents
28
+ - [Dataset Description](#dataset-description)
29
+ - [Dataset Summary](#dataset-summary)
30
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
31
+ - [Languages](#languages)
32
+ - [Dataset Structure](#dataset-structure)
33
+ - [Data Instances](#data-instances)
34
+ - [Data Fields](#data-instances)
35
+ - [Data Splits](#data-instances)
36
+ - [Dataset Creation](#dataset-creation)
37
+ - [Curation Rationale](#curation-rationale)
38
+ - [Source Data](#source-data)
39
+ - [Annotations](#annotations)
40
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
41
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
42
+ - [Social Impact of Dataset](#social-impact-of-dataset)
43
+ - [Discussion of Biases](#discussion-of-biases)
44
+ - [Other Known Limitations](#other-known-limitations)
45
+ - [Additional Information](#additional-information)
46
+ - [Dataset Curators](#dataset-curators)
47
+ - [Licensing Information](#licensing-information)
48
+ - [Citation Information](#citation-information)
49
+
50
+ ## Dataset Description
51
+
52
+ - **Homepage:** [QuAC](https://quac.ai/)
53
+ - **Paper:** [QuAC: Question Answering in Context](https://arxiv.org/abs/1808.07036)
54
+ - **Leaderboard:** [QuAC's leaderboard](https://quac.ai/)
55
+ - **Point of Contact:** [Google group](https://groups.google.com/forum/#!forum/quac_ai)
56
+
57
+ ### Dataset Summary
58
+
59
+ Question Answering in Context is a dataset for modeling, understanding, and participating in information seeking dialog. Data instances consist of an interactive dialog between two crowd workers: (1) a student who poses a sequence of freeform questions to learn as much as possible about a hidden Wikipedia text, and (2) a teacher who answers the questions by providing short excerpts (spans) from the text. QuAC introduces challenges not found in existing machine comprehension datasets: its questions are often more open-ended, unanswerable, or only meaningful within the dialog context.
60
+
61
+ ### Supported Tasks and Leaderboards
62
+
63
+ The core problem involves predicting a text span to answer a question about a Wikipedia section (extractive question answering). Since QuAC questions include a dialog component, each instance includes a “dialog history” of questions and answers asked in the dialog prior to the given question, along with some additional metadata.
64
+
65
+ Authors provided [an official evaluation script](https://s3.amazonaws.com/my89public/quac/scorer.py) for evaluation.
66
+
67
+ ### Languages
68
+
69
+ The text in the dataset is in English. The associated BCP-47 code is `en`.
70
+
71
+ ## Dataset Structure
72
+
73
+ ### Data Instances
74
+
75
+ A validation examples looks like this (one entry per dialogue):
76
+
77
+ ```
78
+ {
79
+ 'dialogue_id': 'C_6abd2040a75d47168a9e4cca9ca3fed5_0',
80
+
81
+ 'wikipedia_page_title': 'Satchel Paige',
82
+
83
+ 'background': 'Leroy Robert "Satchel" Paige (July 7, 1906 - June 8, 1982) was an American Negro league baseball and Major League Baseball (MLB) pitcher who became a legend in his own lifetime by being known as perhaps the best pitcher in baseball history, by his longevity in the game, and by attracting record crowds wherever he pitched. Paige was a right-handed pitcher, and at age 42 in 1948, he was the oldest major league rookie while playing for the Cleveland Indians. He played with the St. Louis Browns until age 47, and represented them in the All-Star Game in 1952 and 1953.',
84
+
85
+ 'section_title': 'Chattanooga and Birmingham: 1926-29',
86
+
87
+ 'context': 'A former friend from the Mobile slums, Alex Herman, was the player/manager for the Chattanooga White Sox of the minor Negro Southern League. In 1926 he discovered Paige and offered to pay him $250 per month, of which Paige would collect $50 with the rest going to his mother. He also agreed to pay Lula Paige a $200 advance, and she agreed to the contract. The local newspapers--the Chattanooga News and Chattanooga Times--recognized from the beginning that Paige was special. In April 1926, shortly after his arrival, he recorded nine strikeouts over six innings against the Atlanta Black Crackers. Part way through the 1927 season, Paige\'s contract was sold to the Birmingham Black Barons of the major Negro National League (NNL). According to Paige\'s first memoir, his contract was for $450 per month, but in his second he said it was for $275. Pitching for the Black Barons, Paige threw hard but was wild and awkward. In his first big game in late June 1927, against the St. Louis Stars, Paige incited a brawl when his fastball hit the hand of St. Louis catcher Mitchell Murray. Murray then charged the mound and Paige raced for the dugout, but Murray flung his bat and struck Paige above the hip. The police were summoned, and the headline of the Birmingham Reporter proclaimed a "Near Riot." Paige improved and matured as a pitcher with help from his teammates, Sam Streeter and Harry Salmon, and his manager, Bill Gatewood. He finished the 1927 season 7-1 with 69 strikeouts and 26 walks in 89 1/3 innings. Over the next two seasons, Paige went 12-5 and 10-9 while recording 176 strikeouts in 1929. (Several sources credit his 1929 strikeout total as the all-time single-season record for the Negro leagues, though there is variation among the sources about the exact number of strikeouts.) On April 29 of that season he recorded 17 strikeouts in a game against the Cuban Stars, which exceeded what was then the major league record of 16 held by Noodles Hahn and Rube Waddell. Six days later he struck out 18 Nashville Elite Giants, a number that was tied in the white majors by Bob Feller in 1938. Due to his increased earning potential, Barons owner R. T. Jackson would "rent" Paige out to other ball clubs for a game or two to draw a decent crowd, with both Jackson and Paige taking a cut. CANNOTANSWER',
88
+
89
+ 'turn_ids': ['C_6abd2040a75d47168a9e4cca9ca3fed5_0_q#0', 'C_6abd2040a75d47168a9e4cca9ca3fed5_0_q#1', 'C_6abd2040a75d47168a9e4cca9ca3fed5_0_q#2', 'C_6abd2040a75d47168a9e4cca9ca3fed5_0_q#3', 'C_6abd2040a75d47168a9e4cca9ca3fed5_0_q#4', 'C_6abd2040a75d47168a9e4cca9ca3fed5_0_q#5', 'C_6abd2040a75d47168a9e4cca9ca3fed5_0_q#6', 'C_6abd2040a75d47168a9e4cca9ca3fed5_0_q#7'],
90
+
91
+ 'questions': ['what did he do in Chattanooga', 'how did he discover him', 'what position did he play', 'how did they help him', 'when did he go to Birmingham', 'how did he feel about this', 'how did he do with this team', 'What made him leave the team'],
92
+
93
+ 'followups': [0, 2, 0, 1, 0, 1, 0, 1],
94
+
95
+ 'yesnos': [2, 2, 2, 2, 2, 2, 2, 2]
96
+
97
+ 'answers': {
98
+ 'answer_starts': [
99
+ [480, 39, 0, 67, 39],
100
+ [2300, 2300, 2300],
101
+ [848, 1023, 848, 848, 1298],
102
+ [2300, 2300, 2300, 2300, 2300],
103
+ [600, 600, 600, 634, 600],
104
+ [2300, 2300, 2300],
105
+ [939, 1431, 848, 848, 1514],
106
+ [2106, 2106, 2165]
107
+ ],
108
+ 'texts': [
109
+ ['April 1926, shortly after his arrival, he recorded nine strikeouts over six innings against the Atlanta Black Crackers.', 'Alex Herman, was the player/manager for the Chattanooga White Sox of the minor Negro Southern League. In 1926 he discovered Paige', 'A former friend from the Mobile slums, Alex Herman, was the player/manager for the Chattanooga White Sox of the minor Negro Southern League.', 'manager for the Chattanooga White Sox of the minor Negro Southern League. In 1926 he discovered Paige and offered to pay him $250 per month,', 'Alex Herman, was the player/manager for the Chattanooga White Sox of the minor Negro Southern League. In 1926 he discovered Paige and offered to pay him $250 per month,'],
110
+ ['CANNOTANSWER', 'CANNOTANSWER', 'CANNOTANSWER'],
111
+ ['Pitching for the Black Barons,', 'fastball', 'Pitching for', 'Pitching', 'Paige improved and matured as a pitcher with help from his teammates,'], ['CANNOTANSWER', 'CANNOTANSWER', 'CANNOTANSWER', 'CANNOTANSWER', 'CANNOTANSWER'],
112
+ ["Part way through the 1927 season, Paige's contract was sold to the Birmingham Black Barons", "Part way through the 1927 season, Paige's contract was sold to the Birmingham Black Barons", "Part way through the 1927 season, Paige's contract was sold to the Birmingham Black Barons", "Paige's contract was sold to the Birmingham Black Barons of the major Negro National League (NNL", "Part way through the 1927 season, Paige's contract was sold to the Birmingham Black Barons"], ['CANNOTANSWER', 'CANNOTANSWER', 'CANNOTANSWER'],
113
+ ['game in late June 1927, against the St. Louis Stars, Paige incited a brawl when his fastball hit the hand of St. Louis catcher Mitchell Murray.', 'He finished the 1927 season 7-1 with 69 strikeouts and 26 walks in 89 1/3 innings.', 'Pitching for the Black Barons, Paige threw hard but was wild and awkward.', 'Pitching for the Black Barons, Paige threw hard but was wild and awkward.', 'Over the next two seasons, Paige went 12-5 and 10-9 while recording 176 strikeouts in 1929. ('],
114
+ ['Due to his increased earning potential, Barons owner R. T. Jackson would "rent" Paige out to other ball clubs', 'Due to his increased earning potential, Barons owner R. T. Jackson would "rent" Paige out to other ball clubs for a game or two to draw a decent crowd,', 'Jackson would "rent" Paige out to other ball clubs for a game or two to draw a decent crowd, with both Jackson and Paige taking a cut.']
115
+ ]
116
+ },
117
+
118
+ 'orig_answers': {
119
+ 'answer_starts': [39, 2300, 1298, 2300, 600, 2300, 1514, 2165],
120
+ 'texts': ['Alex Herman, was the player/manager for the Chattanooga White Sox of the minor Negro Southern League. In 1926 he discovered Paige and offered to pay him $250 per month,', 'CANNOTANSWER', 'Paige improved and matured as a pitcher with help from his teammates,', 'CANNOTANSWER', "Part way through the 1927 season, Paige's contract was sold to the Birmingham Black Barons", 'CANNOTANSWER', 'Over the next two seasons, Paige went 12-5 and 10-9 while recording 176 strikeouts in 1929. (', 'Jackson would "rent" Paige out to other ball clubs for a game or two to draw a decent crowd, with both Jackson and Paige taking a cut.']
121
+ },
122
+ }
123
+ ```
124
+
125
+ ### Data Fields
126
+
127
+ - `dialogue_id`: ID of the dialogue.
128
+ - `wikipedia_page_title`: title of the Wikipedia page.
129
+ - `background`: first paragraph of the main Wikipedia article.
130
+ - `section_tile`: Wikipedia section title.
131
+ - `context`: Wikipedia section text.
132
+ - `turn_ids`: list of identification of dialogue turns. One list of ids per dialogue.
133
+ - `questions`: list of questions in the dialogue. One list of questions per dialogue.
134
+ - `followups`: list of followup actions in the dialogue. One list of followups per dialogue. `y`: follow, `m`: maybe follow yp, `n`: don't follow up.
135
+ - `yesnos`: list of yes/no in the dialogue. One list of yes/nos per dialogue. `y`: yes, `n`: no, `x`: neither.
136
+ - `answers`: dictionary of answers to the questions (validation step of data collection)
137
+ - `answer_starts`: list of list of starting offsets. For training, list of single element lists (one answer per question).
138
+ - `texts`: list of list of span texts answering questions. For training, list of single element lists (one answer per question).
139
+ - `orig_answers`: dictionary of original answers (the ones provided by the teacher in the dialogue)
140
+ - `answer_starts`: list of starting offsets
141
+ - `texts`: list of span texts answering questions.
142
+
143
+ ### Data Splits
144
+
145
+ QuAC contains 98,407 QA pairs from 13,594 dialogs. The dialogs were conducted on 8,854 unique sections from 3,611 unique Wikipedia articles, and every dialog contains between four and twelve questions.
146
+
147
+ The dataset comes with a train/dev split such that there is no overlap in sections across splits. Furthermore, the dev and test sets only include one
148
+ dialog per section, in contrast to the training set which can have multiple dialogs per section. Dev and test instances come with five reference answers instead of just one as in the training set; we obtain the extra references to improve the reliability of our evaluations, as questions can have multiple valid answer spans. The test set is not publicly available; instead, researchers must submit their models to the [leaderboard](http://quac.ai), which will run the model on our hidden test set.
149
+
150
+ The training set contains 83,568 questions (11,567 dialogues), while 7,354 (1,000) and 7,353 (1,002) separate questions are reserved for the dev and test set respectively.
151
+
152
+ ## Dataset Creation
153
+
154
+ ### Curation Rationale
155
+
156
+ Please refer to the [Datasheet](https://quac.ai/datasheet.pdf) from the authors of the dataset.
157
+
158
+ ### Source Data
159
+
160
+ Please refer to the [Datasheet](https://quac.ai/datasheet.pdf) from the authors of the dataset.
161
+
162
+ #### Initial Data Collection and Normalization
163
+
164
+ Please refer to the [Datasheet](https://quac.ai/datasheet.pdf) from the authors of the dataset.
165
+
166
+ #### Who are the source language producers?
167
+
168
+ Please refer to the [Datasheet](https://quac.ai/datasheet.pdf) from the authors of the dataset.
169
+
170
+ ### Annotations
171
+
172
+ Please refer to the [Datasheet](https://quac.ai/datasheet.pdf) from the authors of the dataset.
173
+
174
+ #### Annotation process
175
+
176
+ Please refer to the [Datasheet](https://quac.ai/datasheet.pdf) from the authors of the dataset.
177
+
178
+ #### Who are the annotators?
179
+
180
+ Please refer to the [Datasheet](https://quac.ai/datasheet.pdf) from the authors of the dataset.
181
+ ### Personal and Sensitive Information
182
+
183
+ Please refer to the [Datasheet](https://quac.ai/datasheet.pdf) from the authors of the dataset.
184
+
185
+ ## Considerations for Using the Data
186
+
187
+ ### Social Impact of Dataset
188
+
189
+ Please refer to the [Datasheet](https://quac.ai/datasheet.pdf) from the authors of the dataset.
190
+
191
+ ### Discussion of Biases
192
+
193
+ Please refer to the [Datasheet](https://quac.ai/datasheet.pdf) from the authors of the dataset.
194
+
195
+ ### Other Known Limitations
196
+
197
+ Please refer to the [Datasheet](https://quac.ai/datasheet.pdf) from the authors of the dataset.
198
+
199
+ ## Additional Information
200
+
201
+ ### Dataset Curators
202
+
203
+ Please refer to the [Datasheet](https://quac.ai/datasheet.pdf) from the authors of the dataset.
204
+
205
+ ### Licensing Information
206
+
207
+ The dataset is distributed under the MIT license.
208
+
209
+ ### Citation Information
210
+
211
+ Provide the [BibTex](http://www.bibtex.org/)-formatted reference for the dataset. For example:
212
+ ```
213
+ @inproceedings{choi-etal-2018-quac,
214
+ title = "{Q}u{AC}: Question Answering in Context",
215
+ author = "Choi, Eunsol and
216
+ He, He and
217
+ Iyyer, Mohit and
218
+ Yatskar, Mark and
219
+ Yih, Wen-tau and
220
+ Choi, Yejin and
221
+ Liang, Percy and
222
+ Zettlemoyer, Luke",
223
+ booktitle = "Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing",
224
+ month = oct # "-" # nov,
225
+ year = "2018",
226
+ address = "Brussels, Belgium",
227
+ publisher = "Association for Computational Linguistics",
228
+ url = "https://www.aclweb.org/anthology/D18-1241",
229
+ doi = "10.18653/v1/D18-1241",
230
+ pages = "2174--2184",
231
+ abstract = "We present QuAC, a dataset for Question Answering in Context that contains 14K information-seeking QA dialogs (100K questions in total). The dialogs involve two crowd workers: (1) a student who poses a sequence of freeform questions to learn as much as possible about a hidden Wikipedia text, and (2) a teacher who answers the questions by providing short excerpts from the text. QuAC introduces challenges not found in existing machine comprehension datasets: its questions are often more open-ended, unanswerable, or only meaningful within the dialog context, as we show in a detailed qualitative evaluation. We also report results for a number of reference models, including a recently state-of-the-art reading comprehension architecture extended to model dialog context. Our best model underperforms humans by 20 F1, suggesting that there is significant room for future work on this data. Dataset, baseline, and leaderboard available at \url{http://quac.ai}.",
232
+ }
233
+ ```
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"plain_text": {"description": "Question Answering in Context is a dataset for modeling, understanding,\nand participating in information seeking dialog. Data instances consist\nof an interactive dialog between two crowd workers: (1) a student who\nposes a sequence of freeform questions to learn as much as possible\nabout a hidden Wikipedia text, and (2) a teacher who answers the questions\nby providing short excerpts (spans) from the text. QuAC introduces\nchallenges not found in existing machine comprehension datasets: its\nquestions are often more open-ended, unanswerable, or only meaningful\nwithin the dialog context.\n", "citation": "@inproceedings{choi-etal-2018-quac,\ntitle = \"QUAC: Question answering in context\",\nabstract = \"We present QuAC, a dataset for Question Answering in Context that contains 14K information-seeking QA dialogs (100K questions in total). The dialogs involve two crowd workers: (1) a student who poses a sequence of freeform questions to learn as much as possible about a hidden Wikipedia text, and (2) a teacher who answers the questions by providing short excerpts from the text. QuAC introduces challenges not found in existing machine comprehension datasets: its questions are often more open-ended, unanswerable, or only meaningful within the dialog context, as we show in a detailed qualitative evaluation. We also report results for a number of reference models, including a recently state-of-the-art reading comprehension architecture extended to model dialog context. Our best model underperforms humans by 20 F1, suggesting that there is significant room for future work on this data. Dataset, baseline, and leaderboard available at http://quac.ai.\",\nauthor = \"Eunsol Choi and He He and Mohit Iyyer and Mark Yatskar and Yih, {Wen Tau} and Yejin Choi and Percy Liang and Luke Zettlemoyer\",\nyear = \"2018\",\nlanguage = \"English (US)\",\nseries = \"Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, EMNLP 2018\",\npublisher = \"Association for Computational Linguistics\",\npages = \"2174--2184\",\neditor = \"Ellen Riloff and David Chiang and Julia Hockenmaier and Jun'ichi Tsujii\",\nbooktitle = \"Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, EMNLP 2018\",\nnote = \"2018 Conference on Empirical Methods in Natural Language Processing, EMNLP 2018 ; Conference date: 31-10-2018 Through 04-11-2018\",\n}\n", "homepage": "https://quac.ai/", "license": "MIT", "features": {"dialogue_id": {"dtype": "string", "id": null, "_type": "Value"}, "wikipedia_page_title": {"dtype": "string", "id": null, "_type": "Value"}, "background": {"dtype": "string", "id": null, "_type": "Value"}, "section_title": {"dtype": "string", "id": null, "_type": "Value"}, "context": {"dtype": "string", "id": null, "_type": "Value"}, "turn_ids": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "questions": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "followups": {"feature": {"num_classes": 3, "names": ["y", "n", "m"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}, "yesnos": {"feature": {"num_classes": 3, "names": ["y", "n", "x"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}, "answers": {"feature": {"texts": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "answer_starts": {"feature": {"dtype": "int32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "length": -1, "id": null, "_type": "Sequence"}, "orig_answers": {"texts": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "answer_starts": {"feature": {"dtype": "int32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}}, "post_processed": null, "supervised_keys": null, "builder_name": "quac", "config_name": "plain_text", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 58174754, "num_examples": 11567, "dataset_name": "quac"}, "validation": {"name": "validation", "num_bytes": 7375938, "num_examples": 1000, "dataset_name": "quac"}}, "download_checksums": {"https://s3.amazonaws.com/my89public/quac/train_v0.2.json": {"num_bytes": 68114819, "checksum": "ff5cca5a2e4b4d1cb5b5ced68b9fce88394ef6d93117426d6d4baafbcc05c56a"}, "https://s3.amazonaws.com/my89public/quac/val_v0.2.json": {"num_bytes": 8929167, "checksum": "09e622916280ba04c9352acb1bc5bbe80f11a2598f6f34e934c51d9e6570f378"}}, "download_size": 77043986, "post_processing_size": null, "dataset_size": 65550692, "size_in_bytes": 142594678}}
dummy/plain_text/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8008759918c5afcca4b528a4ab9a5c7c593f05c30f02446a22c61f2382847d4e
3
+ size 16212
quac.py ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """QUAC (Question Answering in Context)."""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import json
20
+
21
+ import datasets
22
+
23
+
24
+ _CITATION = """\
25
+ @inproceedings{choi-etal-2018-quac,
26
+ title = "QUAC: Question answering in context",
27
+ abstract = "We present QuAC, a dataset for Question Answering in Context that contains 14K information-seeking QA dialogs (100K questions in total). The dialogs involve two crowd workers: (1) a student who poses a sequence of freeform questions to learn as much as possible about a hidden Wikipedia text, and (2) a teacher who answers the questions by providing short excerpts from the text. QuAC introduces challenges not found in existing machine comprehension datasets: its questions are often more open-ended, unanswerable, or only meaningful within the dialog context, as we show in a detailed qualitative evaluation. We also report results for a number of reference models, including a recently state-of-the-art reading comprehension architecture extended to model dialog context. Our best model underperforms humans by 20 F1, suggesting that there is significant room for future work on this data. Dataset, baseline, and leaderboard available at http://quac.ai.",
28
+ author = "Eunsol Choi and He He and Mohit Iyyer and Mark Yatskar and Yih, {Wen Tau} and Yejin Choi and Percy Liang and Luke Zettlemoyer",
29
+ year = "2018",
30
+ language = "English (US)",
31
+ series = "Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, EMNLP 2018",
32
+ publisher = "Association for Computational Linguistics",
33
+ pages = "2174--2184",
34
+ editor = "Ellen Riloff and David Chiang and Julia Hockenmaier and Jun'ichi Tsujii",
35
+ booktitle = "Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, EMNLP 2018",
36
+ note = "2018 Conference on Empirical Methods in Natural Language Processing, EMNLP 2018 ; Conference date: 31-10-2018 Through 04-11-2018",
37
+ }
38
+ """
39
+
40
+ _DESCRIPTION = """\
41
+ Question Answering in Context is a dataset for modeling, understanding,
42
+ and participating in information seeking dialog. Data instances consist
43
+ of an interactive dialog between two crowd workers: (1) a student who
44
+ poses a sequence of freeform questions to learn as much as possible
45
+ about a hidden Wikipedia text, and (2) a teacher who answers the questions
46
+ by providing short excerpts (spans) from the text. QuAC introduces
47
+ challenges not found in existing machine comprehension datasets: its
48
+ questions are often more open-ended, unanswerable, or only meaningful
49
+ within the dialog context.
50
+ """
51
+
52
+ _HOMEPAGE = "https://quac.ai/"
53
+
54
+ _LICENSE = "MIT"
55
+
56
+ _URLs = {
57
+ "train": "https://s3.amazonaws.com/my89public/quac/train_v0.2.json",
58
+ "validation": "https://s3.amazonaws.com/my89public/quac/val_v0.2.json",
59
+ }
60
+
61
+
62
+ class Quac(datasets.GeneratorBasedBuilder):
63
+ """QuAC (Question Answering in Context)."""
64
+
65
+ VERSION = datasets.Version("1.1.0")
66
+
67
+ BUILDER_CONFIGS = [
68
+ datasets.BuilderConfig(
69
+ name="plain_text",
70
+ description="Plain text",
71
+ version=VERSION,
72
+ ),
73
+ ]
74
+
75
+ def _info(self):
76
+ return datasets.DatasetInfo(
77
+ description=_DESCRIPTION,
78
+ features=datasets.Features(
79
+ {
80
+ "dialogue_id": datasets.Value("string"),
81
+ "wikipedia_page_title": datasets.Value("string"),
82
+ "background": datasets.Value("string"),
83
+ "section_title": datasets.Value("string"),
84
+ "context": datasets.Value("string"),
85
+ "turn_ids": datasets.Sequence(datasets.Value("string")),
86
+ "questions": datasets.Sequence(datasets.Value("string")),
87
+ "followups": datasets.Sequence(datasets.ClassLabel(names=["y", "n", "m"])),
88
+ "yesnos": datasets.Sequence(datasets.ClassLabel(names=["y", "n", "x"])),
89
+ "answers": datasets.Sequence(
90
+ {
91
+ "texts": datasets.Sequence(datasets.Value("string")),
92
+ "answer_starts": datasets.Sequence(datasets.Value("int32")),
93
+ }
94
+ ),
95
+ "orig_answers": {
96
+ "texts": datasets.Sequence(datasets.Value("string")),
97
+ "answer_starts": datasets.Sequence(datasets.Value("int32")),
98
+ },
99
+ }
100
+ ),
101
+ supervised_keys=None,
102
+ homepage=_HOMEPAGE,
103
+ license=_LICENSE,
104
+ citation=_CITATION,
105
+ )
106
+
107
+ def _split_generators(self, dl_manager):
108
+ """Returns SplitGenerators."""
109
+ data_dir = dl_manager.download_and_extract(_URLs)
110
+ return [
111
+ datasets.SplitGenerator(
112
+ name=datasets.Split.TRAIN,
113
+ gen_kwargs={
114
+ "filepath": data_dir["train"],
115
+ },
116
+ ),
117
+ datasets.SplitGenerator(
118
+ name=datasets.Split.VALIDATION,
119
+ gen_kwargs={
120
+ "filepath": data_dir["validation"],
121
+ },
122
+ ),
123
+ ]
124
+
125
+ def _generate_examples(self, filepath):
126
+ """ Yields examples. """
127
+ with open(filepath, encoding="utf-8") as f:
128
+ squad = json.load(f)
129
+ for section in squad["data"]:
130
+ wiki_page_title = section.get("title", "").strip()
131
+ background = section.get("background", "").strip()
132
+ section_title = section.get("section_title", "").strip()
133
+
134
+ for dialogue in section["paragraphs"]:
135
+ context = dialogue["context"].strip()
136
+ dialogue_id = dialogue["id"]
137
+
138
+ followups = []
139
+ yesnos = []
140
+ questions = []
141
+ turn_ids = []
142
+ answers = []
143
+ orig_answers = {"texts": [], "answer_starts": []}
144
+
145
+ for turn in dialogue["qas"]:
146
+ followups.append(turn["followup"])
147
+ yesnos.append(turn["yesno"])
148
+ questions.append(turn["question"])
149
+ turn_ids.append(turn["id"])
150
+
151
+ ans_ = {
152
+ "texts": [t["text"].strip() for t in turn["answers"]],
153
+ "answer_starts": [t["answer_start"] for t in turn["answers"]],
154
+ }
155
+ answers.append(ans_)
156
+
157
+ orig_answers["texts"].append(turn["orig_answer"]["text"])
158
+ orig_answers["answer_starts"].append(turn["orig_answer"]["answer_start"])
159
+
160
+ yield dialogue_id, {
161
+ "dialogue_id": dialogue_id,
162
+ "wikipedia_page_title": wiki_page_title,
163
+ "background": background,
164
+ "section_title": section_title,
165
+ "context": context,
166
+ "turn_ids": turn_ids,
167
+ "questions": questions,
168
+ "followups": followups,
169
+ "yesnos": yesnos,
170
+ "answers": answers,
171
+ "orig_answers": orig_answers,
172
+ }