system HF staff commited on
Commit
7a79318
0 Parent(s):

Update files from the datasets library (from 1.0.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.0.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
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"cooking": {"description": "\nDoQA is a dataset for accessing Domain Specific FAQs via conversational QA that contains 2,437 information-seeking question/answer dialogues \n(10,917 questions in total) on three different domains: cooking, travel and movies. Note that we include in the generic concept of FAQs also \nCommunity Question Answering sites, as well as corporate information in intranets which is maintained in textual form similar to FAQs, often \nreferred to as internal \u201cknowledge bases\u201d.\n\nThese dialogues are created by crowd workers that play the following two roles: the user who asks questions about a given topic posted in Stack \nExchange (https://stackexchange.com/), and the domain expert who replies to the questions by selecting a short span of text from the long textual \nreply in the original post. The expert can rephrase the selected span, in order to make it look more natural. The dataset covers unanswerable \nquestions and some relevant dialogue acts.\n\nDoQA enables the development and evaluation of conversational QA systems that help users access the knowledge buried in domain specific FAQs.\n", "citation": "\n@misc{campos2020doqa,\n title={DoQA -- Accessing Domain-Specific FAQs via Conversational QA},\n author={Jon Ander Campos and Arantxa Otegi and Aitor Soroa and Jan Deriu and Mark Cieliebak and Eneko Agirre},\n year={2020},\n eprint={2005.01328},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n ", "homepage": "https://github.com/RevanthRameshkumar/CRD3", "license": "", "features": {"title": {"dtype": "string", "id": null, "_type": "Value"}, "background": {"dtype": "string", "id": null, "_type": "Value"}, "context": {"dtype": "string", "id": null, "_type": "Value"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "id": {"dtype": "string", "id": null, "_type": "Value"}, "answers": {"feature": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "answer_start": {"dtype": "int32", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}, "followup": {"dtype": "string", "id": null, "_type": "Value"}, "yesno": {"dtype": "string", "id": null, "_type": "Value"}, "orig_answer": {"feature": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "answer_start": {"dtype": "int32", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}}, "supervised_keys": null, "builder_name": "doqa", "config_name": "cooking", "version": {"version_str": "2.1.0", "description": "", "datasets_version_to_prepare": null, "major": 2, "minor": 1, "patch": 0}, "splits": {"test": {"name": "test", "num_bytes": 2969064, "num_examples": 1797, "dataset_name": "doqa"}, "validation": {"name": "validation", "num_bytes": 1461613, "num_examples": 911, "dataset_name": "doqa"}, "train": {"name": "train", "num_bytes": 6881681, "num_examples": 4612, "dataset_name": "doqa"}}, "download_checksums": {"https://ixa2.si.ehu.es/convai/doqa-v2.1.zip": {"num_bytes": 4197671, "checksum": "aa5b236accee68a5ecc49f1d884ea5251f61f4cb7bb2c20fe005e47d41555ef7"}}, "download_size": 4197671, "dataset_size": 11312358, "size_in_bytes": 15510029}, "movies": {"description": "\nDoQA is a dataset for accessing Domain Specific FAQs via conversational QA that contains 2,437 information-seeking question/answer dialogues \n(10,917 questions in total) on three different domains: cooking, travel and movies. Note that we include in the generic concept of FAQs also \nCommunity Question Answering sites, as well as corporate information in intranets which is maintained in textual form similar to FAQs, often \nreferred to as internal \u201cknowledge bases\u201d.\n\nThese dialogues are created by crowd workers that play the following two roles: the user who asks questions about a given topic posted in Stack \nExchange (https://stackexchange.com/), and the domain expert who replies to the questions by selecting a short span of text from the long textual \nreply in the original post. The expert can rephrase the selected span, in order to make it look more natural. The dataset covers unanswerable \nquestions and some relevant dialogue acts.\n\nDoQA enables the development and evaluation of conversational QA systems that help users access the knowledge buried in domain specific FAQs.\n", "citation": "\n@misc{campos2020doqa,\n title={DoQA -- Accessing Domain-Specific FAQs via Conversational QA},\n author={Jon Ander Campos and Arantxa Otegi and Aitor Soroa and Jan Deriu and Mark Cieliebak and Eneko Agirre},\n year={2020},\n eprint={2005.01328},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n ", "homepage": "https://github.com/RevanthRameshkumar/CRD3", "license": "", "features": {"title": {"dtype": "string", "id": null, "_type": "Value"}, "background": {"dtype": "string", "id": null, "_type": "Value"}, "context": {"dtype": "string", "id": null, "_type": "Value"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "id": {"dtype": "string", "id": null, "_type": "Value"}, "answers": {"feature": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "answer_start": {"dtype": "int32", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}, "followup": {"dtype": "string", "id": null, "_type": "Value"}, "yesno": {"dtype": "string", "id": null, "_type": "Value"}, "orig_answer": {"feature": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "answer_start": {"dtype": "int32", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}}, "supervised_keys": null, "builder_name": "doqa", "config_name": "movies", "version": {"version_str": "2.1.0", "description": "", "datasets_version_to_prepare": null, "major": 2, "minor": 1, "patch": 0}, "splits": {"test": {"name": "test", "num_bytes": 3166075, "num_examples": 1884, "dataset_name": "doqa"}}, "download_checksums": {"https://ixa2.si.ehu.es/convai/doqa-v2.1.zip": {"num_bytes": 4197671, "checksum": "aa5b236accee68a5ecc49f1d884ea5251f61f4cb7bb2c20fe005e47d41555ef7"}}, "download_size": 4197671, "dataset_size": 3166075, "size_in_bytes": 7363746}, "travel": {"description": "\nDoQA is a dataset for accessing Domain Specific FAQs via conversational QA that contains 2,437 information-seeking question/answer dialogues \n(10,917 questions in total) on three different domains: cooking, travel and movies. Note that we include in the generic concept of FAQs also \nCommunity Question Answering sites, as well as corporate information in intranets which is maintained in textual form similar to FAQs, often \nreferred to as internal \u201cknowledge bases\u201d.\n\nThese dialogues are created by crowd workers that play the following two roles: the user who asks questions about a given topic posted in Stack \nExchange (https://stackexchange.com/), and the domain expert who replies to the questions by selecting a short span of text from the long textual \nreply in the original post. The expert can rephrase the selected span, in order to make it look more natural. The dataset covers unanswerable \nquestions and some relevant dialogue acts.\n\nDoQA enables the development and evaluation of conversational QA systems that help users access the knowledge buried in domain specific FAQs.\n", "citation": "\n@misc{campos2020doqa,\n title={DoQA -- Accessing Domain-Specific FAQs via Conversational QA},\n author={Jon Ander Campos and Arantxa Otegi and Aitor Soroa and Jan Deriu and Mark Cieliebak and Eneko Agirre},\n year={2020},\n eprint={2005.01328},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n ", "homepage": "https://github.com/RevanthRameshkumar/CRD3", "license": "", "features": {"title": {"dtype": "string", "id": null, "_type": "Value"}, "background": {"dtype": "string", "id": null, "_type": "Value"}, "context": {"dtype": "string", "id": null, "_type": "Value"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "id": {"dtype": "string", "id": null, "_type": "Value"}, "answers": {"feature": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "answer_start": {"dtype": "int32", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}, "followup": {"dtype": "string", "id": null, "_type": "Value"}, "yesno": {"dtype": "string", "id": null, "_type": "Value"}, "orig_answer": {"feature": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "answer_start": {"dtype": "int32", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}}, "supervised_keys": null, "builder_name": "doqa", "config_name": "travel", "version": {"version_str": "2.1.0", "description": "", "datasets_version_to_prepare": null, "major": 2, "minor": 1, "patch": 0}, "splits": {"test": {"name": "test", "num_bytes": 3216374, "num_examples": 1713, "dataset_name": "doqa"}}, "download_checksums": {"https://ixa2.si.ehu.es/convai/doqa-v2.1.zip": {"num_bytes": 4197671, "checksum": "aa5b236accee68a5ecc49f1d884ea5251f61f4cb7bb2c20fe005e47d41555ef7"}}, "download_size": 4197671, "dataset_size": 3216374, "size_in_bytes": 7414045}}
doqa.py ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 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
+ """CRD3 dataset"""
18
+
19
+ from __future__ import absolute_import, division, print_function
20
+
21
+ import json
22
+ import os
23
+
24
+ import datasets
25
+
26
+
27
+ _CITATION = """
28
+ @misc{campos2020doqa,
29
+ title={DoQA -- Accessing Domain-Specific FAQs via Conversational QA},
30
+ author={Jon Ander Campos and Arantxa Otegi and Aitor Soroa and Jan Deriu and Mark Cieliebak and Eneko Agirre},
31
+ year={2020},
32
+ eprint={2005.01328},
33
+ archivePrefix={arXiv},
34
+ primaryClass={cs.CL}
35
+ }
36
+ """
37
+
38
+ _DESCRIPTION = """
39
+ DoQA is a dataset for accessing Domain Specific FAQs via conversational QA that contains 2,437 information-seeking question/answer dialogues
40
+ (10,917 questions in total) on three different domains: cooking, travel and movies. Note that we include in the generic concept of FAQs also
41
+ Community Question Answering sites, as well as corporate information in intranets which is maintained in textual form similar to FAQs, often
42
+ referred to as internal “knowledge bases”.
43
+
44
+ These dialogues are created by crowd workers that play the following two roles: the user who asks questions about a given topic posted in Stack
45
+ Exchange (https://stackexchange.com/), and the domain expert who replies to the questions by selecting a short span of text from the long textual
46
+ reply in the original post. The expert can rephrase the selected span, in order to make it look more natural. The dataset covers unanswerable
47
+ questions and some relevant dialogue acts.
48
+
49
+ DoQA enables the development and evaluation of conversational QA systems that help users access the knowledge buried in domain specific FAQs.
50
+ """
51
+
52
+ _URL = "https://ixa2.si.ehu.es/convai/doqa-v2.1.zip"
53
+
54
+
55
+ class DoqaConfig(datasets.BuilderConfig):
56
+ """BuilderConfig for DoQA."""
57
+
58
+ def __init__(self, **kwargs):
59
+ """Constructs a DoQA.
60
+
61
+ Args:
62
+ **kwargs: keyword arguments forwarded to super.
63
+ """
64
+
65
+ super(DoqaConfig, self).__init__(version=datasets.Version("2.1.0", ""), **kwargs)
66
+
67
+
68
+ class Doqa(datasets.GeneratorBasedBuilder):
69
+
70
+ BUILDER_CONFIGS = [
71
+ DoqaConfig(
72
+ name="cooking",
73
+ ),
74
+ DoqaConfig(
75
+ name="movies",
76
+ ),
77
+ DoqaConfig(
78
+ name="travel",
79
+ ),
80
+ ]
81
+
82
+ def _info(self):
83
+ return datasets.DatasetInfo(
84
+ description=_DESCRIPTION,
85
+ features=datasets.Features(
86
+ {
87
+ "title": datasets.Value("string"),
88
+ "background": datasets.Value("string"),
89
+ "context": datasets.Value("string"),
90
+ "question": datasets.Value("string"),
91
+ "id": datasets.Value("string"),
92
+ "answers": datasets.features.Sequence(
93
+ {
94
+ "text": datasets.Value("string"),
95
+ "answer_start": datasets.Value("int32"),
96
+ }
97
+ ),
98
+ "followup": datasets.Value("string"),
99
+ "yesno": datasets.Value("string"),
100
+ "orig_answer": datasets.features.Sequence(
101
+ {
102
+ "text": datasets.Value("string"),
103
+ "answer_start": datasets.Value("int32"),
104
+ }
105
+ ),
106
+ }
107
+ ),
108
+ homepage="http://ixa.eus/node/12931",
109
+ citation=_CITATION,
110
+ )
111
+
112
+ def _split_generators(self, dl_manager):
113
+ path = dl_manager.download_and_extract(_URL)
114
+ if self.config.name == "cooking":
115
+ return [
116
+ datasets.SplitGenerator(
117
+ name=datasets.Split.TEST,
118
+ gen_kwargs={
119
+ "filepath": os.path.join(path, "doqa-v2.1", "doqa_dataset", "doqa-cooking-test-v2.1.json")
120
+ },
121
+ ),
122
+ datasets.SplitGenerator(
123
+ name=datasets.Split.VALIDATION,
124
+ gen_kwargs={
125
+ "filepath": os.path.join(path, "doqa-v2.1", "doqa_dataset", "doqa-cooking-dev-v2.1.json")
126
+ },
127
+ ),
128
+ datasets.SplitGenerator(
129
+ name=datasets.Split.TRAIN,
130
+ gen_kwargs={
131
+ "filepath": os.path.join(path, "doqa-v2.1", "doqa_dataset", "doqa-cooking-train-v2.1.json")
132
+ },
133
+ ),
134
+ ]
135
+ elif self.config.name == "movies":
136
+ return [
137
+ datasets.SplitGenerator(
138
+ name=datasets.Split.TEST,
139
+ gen_kwargs={
140
+ "filepath": os.path.join(path, "doqa-v2.1", "doqa_dataset", "doqa-movies-test-v2.1.json")
141
+ },
142
+ )
143
+ ]
144
+ elif self.config.name == "travel":
145
+ return [
146
+ datasets.SplitGenerator(
147
+ name=datasets.Split.TEST,
148
+ gen_kwargs={
149
+ "filepath": os.path.join(path, "doqa-v2.1", "doqa_dataset", "doqa-travel-test-v2.1.json")
150
+ },
151
+ )
152
+ ]
153
+ else:
154
+ raise ValueError("Unknown config name")
155
+
156
+ def _generate_examples(self, filepath):
157
+ """Yields examples."""
158
+
159
+ with open(filepath, encoding="utf-8") as f:
160
+ data = json.load(f)
161
+ for row in data["data"]:
162
+ title = row["title"]
163
+ background = row["background"]
164
+ paragraphs = row["paragraphs"]
165
+ for p in paragraphs:
166
+ context = p["context"]
167
+ qas = p["qas"]
168
+ for qa in qas:
169
+ question = qa["question"]
170
+ answers = qa["answers"]
171
+ id1 = qa["id"]
172
+ yesno = qa["yesno"]
173
+ followup = qa["followup"]
174
+ answer_text = [answer["text"] for answer in answers]
175
+ answer_start = [answer["answer_start"] for answer in answers]
176
+
177
+ orig_answer_start = [qa["orig_answer"]["answer_start"]]
178
+ orig_answer_text = [qa["orig_answer"]["text"]]
179
+ yield id1, {
180
+ "title": title,
181
+ "background": background,
182
+ "context": context,
183
+ "question": question,
184
+ "id": id1,
185
+ "answers": {
186
+ "text": answer_text,
187
+ "answer_start": answer_start,
188
+ },
189
+ "followup": followup,
190
+ "yesno": yesno,
191
+ "orig_answer": {
192
+ "text": orig_answer_text,
193
+ "answer_start": orig_answer_start,
194
+ },
195
+ }
dummy/cooking/2.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:85f7fb050843cffd722e35c45ee9c89e49066364558ce8ef5c08ec5a9c4b1283
3
+ size 4609
dummy/movies/2.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:002e47667f2de107d6333b00336e0fb1659f7ccb6011cd43ec1456eb371755a6
3
+ size 1917
dummy/travel/2.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5ef1f98ffdced2390ae73ea400c0068f7e5c6ca77ee20cfa5586d28d1a14c83a
3
+ size 1917