parquet-converter commited on
Commit
f6ad4c9
1 Parent(s): b3989d4

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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plain_text/quac_expanded-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:295cca7ed01447cf088e0062335c87f664567dcbdb6613748ac7d5163e1c40e3
3
+ size 54123972
plain_text/quac_expanded-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c739a81a0b4b29fa009da6c503a38f040c4a3a4017e115aacc3a92bb65bbe717
3
+ size 5802798
quac_expanded.py DELETED
@@ -1,161 +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
- """QUAC (Question Answering in Context)."""
16
-
17
-
18
- import json
19
-
20
- import datasets
21
-
22
-
23
- _CITATION = """\\n@inproceedings{choi-etal-2018-quac,
24
- title = "QUAC: Question answering in context",
25
- 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.",
26
- 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",
27
- year = "2018",
28
- language = "English (US)",
29
- series = "Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, EMNLP 2018",
30
- publisher = "Association for Computational Linguistics",
31
- pages = "2174--2184",
32
- editor = "Ellen Riloff and David Chiang and Julia Hockenmaier and Jun'ichi Tsujii",
33
- booktitle = "Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, EMNLP 2018",
34
- note = "2018 Conference on Empirical Methods in Natural Language Processing, EMNLP 2018 ; Conference date: 31-10-2018 Through 04-11-2018",
35
- }
36
- """
37
-
38
- _DESCRIPTION = """\\nQuestion Answering in Context is a dataset for modeling, understanding,
39
- and participating in information seeking dialog. Data instances consist
40
- of an interactive dialog between two crowd workers: (1) a student who
41
- poses a sequence of freeform questions to learn as much as possible
42
- about a hidden Wikipedia text, and (2) a teacher who answers the questions
43
- by providing short excerpts (spans) from the text. QuAC introduces
44
- challenges not found in existing machine comprehension datasets: its
45
- questions are often more open-ended, unanswerable, or only meaningful
46
- within the dialog context.
47
- """
48
-
49
- _HOMEPAGE = "https://quac.ai/"
50
-
51
- _LICENSE = "MIT"
52
-
53
- _URLs = {
54
- "train": "https://s3.amazonaws.com/my89public/quac/train_v0.2.json",
55
- "validation": "https://s3.amazonaws.com/my89public/quac/val_v0.2.json",
56
- }
57
-
58
-
59
- class Quac(datasets.GeneratorBasedBuilder):
60
- """QuAC (Question Answering in Context)."""
61
-
62
- VERSION = datasets.Version("1.1.0")
63
-
64
- BUILDER_CONFIGS = [
65
- datasets.BuilderConfig(
66
- name="plain_text",
67
- description="Plain text",
68
- version=VERSION,
69
- ),
70
- ]
71
-
72
- def _info(self):
73
- return datasets.DatasetInfo(
74
- description=_DESCRIPTION,
75
- features=datasets.Features(
76
- {
77
- "dialogue_id": datasets.Value("string"),
78
- "wikipedia_page_title": datasets.Value("string"),
79
- "background": datasets.Value("string"),
80
- "section_title": datasets.Value("string"),
81
- "context": datasets.Value("string"),
82
- "turn_id": datasets.Value("string"),
83
- "question": datasets.Value("string"),
84
- "followup": datasets.ClassLabel(names=["y", "n", "m"]),
85
- "yesno": datasets.ClassLabel(names=["y", "n", "x"]),
86
- "answer":
87
- {
88
- "texts": datasets.Sequence(datasets.Value("string")),
89
- "answer_starts": datasets.Sequence(datasets.Value("int32")),
90
- }
91
- ,
92
- "orig_answer": {
93
- "text": datasets.Value("string"),
94
- "answer_start": datasets.Value("int32"),
95
- },
96
- }
97
- ),
98
- supervised_keys=None,
99
- homepage=_HOMEPAGE,
100
- license=_LICENSE,
101
- citation=_CITATION,
102
- )
103
-
104
- def _split_generators(self, dl_manager):
105
- """Returns SplitGenerators."""
106
- data_dir = dl_manager.download_and_extract(_URLs)
107
- return [
108
- datasets.SplitGenerator(
109
- name=datasets.Split.TRAIN,
110
- gen_kwargs={
111
- "filepath": data_dir["train"],
112
- },
113
- ),
114
- datasets.SplitGenerator(
115
- name=datasets.Split.VALIDATION,
116
- gen_kwargs={
117
- "filepath": data_dir["validation"],
118
- },
119
- ),
120
- ]
121
-
122
- def _generate_examples(self, filepath):
123
- """Yields examples."""
124
- _id = 0
125
- with open(filepath, encoding="utf-8") as f:
126
- squad = json.load(f)
127
- for section in squad["data"]:
128
- wiki_page_title = section.get("title", "").strip()
129
- background = section.get("background", "").strip()
130
- section_title = section.get("section_title", "").strip()
131
-
132
- for dialogue in section["paragraphs"]:
133
- context = dialogue["context"].replace("CANNOTANSWER","").strip()
134
- dialogue_id = dialogue["id"]
135
-
136
- for turn in dialogue["qas"]:
137
- answer = {
138
- "texts": [t["text"].replace("CANNOTANSWER","unknown").strip() for t in turn["answers"]],
139
- "answer_starts": [t["answer_start"] for t in turn["answers"]],
140
- }
141
-
142
- orig_answer = {
143
- "text": turn["orig_answer"]["text"].replace("CANNOTANSWER","unknown"),
144
- "answer_start": turn["orig_answer"]["answer_start"],
145
- }
146
-
147
- yield _id, {
148
- "dialogue_id": dialogue_id,
149
- "wikipedia_page_title": wiki_page_title,
150
- "background": background,
151
- "section_title": section_title,
152
- "context": context,
153
- "turn_id": turn["id"],
154
- "question": turn["question"],
155
- "followup": turn["followup"],
156
- "yesno": turn["yesno"],
157
- "answer": answer,
158
- "orig_answer": orig_answer,
159
- }
160
- _id += 1
161
- context += '\n\nQ: '+turn["question"]+'\nA: '+answer['texts'][0]