system HF staff commited on
Commit
57a0820
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,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - expert-generated
6
+ languages:
7
+ - en
8
+ licenses:
9
+ - unknown
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 1K<n<10K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - question-answering
18
+ task_ids:
19
+ - multiple-choice-qa
20
+ ---
21
+
22
+ # Dataset Card Creation Guide
23
+
24
+ ## Table of Contents
25
+ - [Dataset Description](#dataset-description)
26
+ - [Dataset Summary](#dataset-summary)
27
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
28
+ - [Languages](#languages)
29
+ - [Dataset Structure](#dataset-structure)
30
+ - [Data Instances](#data-instances)
31
+ - [Data Fields](#data-instances)
32
+ - [Data Splits](#data-instances)
33
+ - [Dataset Creation](#dataset-creation)
34
+ - [Curation Rationale](#curation-rationale)
35
+ - [Source Data](#source-data)
36
+ - [Annotations](#annotations)
37
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
38
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
39
+ - [Social Impact of Dataset](#social-impact-of-dataset)
40
+ - [Discussion of Biases](#discussion-of-biases)
41
+ - [Other Known Limitations](#other-known-limitations)
42
+ - [Additional Information](#additional-information)
43
+ - [Dataset Curators](#dataset-curators)
44
+ - [Licensing Information](#licensing-information)
45
+ - [Citation Information](#citation-information)
46
+
47
+ ## Dataset Description
48
+
49
+ - **Homepage:** [Add homepage URL here if available (unless it's a GitHub repository)]()
50
+ - **Repository:** [If the dataset is hosted on github or has a github homepage, add URL here]()
51
+ - **Paper:** [If the dataset was introduced by a paper or there was a paper written describing the dataset, add URL here (landing page for Arxiv paper preferred)]()
52
+ - **Leaderboard:** [If the dataset supports an active leaderboard, add link here]()
53
+ - **Point of Contact:** [If known, name and email of at least one person the reader can contact for questions about the dataset.]()
54
+
55
+ ### Dataset Summary
56
+
57
+ [More Information Needed]
58
+
59
+ ### Supported Tasks and Leaderboards
60
+
61
+ [More Information Needed]
62
+
63
+ ### Languages
64
+
65
+ [More Information Needed]
66
+
67
+ ## Dataset Structure
68
+
69
+ ### Data Instances
70
+
71
+ [More Information Needed]
72
+
73
+ ### Data Fields
74
+
75
+ [More Information Needed]
76
+
77
+ ### Data Splits
78
+
79
+ [More Information Needed]
80
+ ## Dataset Creation
81
+
82
+ ### Curation Rationale
83
+
84
+ [More Information Needed]
85
+
86
+ ### Source Data
87
+
88
+ [More Information Needed]
89
+
90
+ #### Initial Data Collection and Normalization
91
+
92
+ [More Information Needed]
93
+
94
+ #### Who are the source language producers?
95
+
96
+ [More Information Needed]
97
+
98
+ ### Annotations
99
+
100
+ [More Information Needed]
101
+
102
+ #### Annotation process
103
+
104
+ [More Information Needed]
105
+
106
+ #### Who are the annotators?
107
+
108
+ [More Information Needed]
109
+
110
+ ### Personal and Sensitive Information
111
+
112
+ [More Information Needed]
113
+
114
+ ## Considerations for Using the Data
115
+
116
+ ### Social Impact of Dataset
117
+
118
+ [More Information Needed]
119
+
120
+ ### Discussion of Biases
121
+
122
+ [More Information Needed]
123
+
124
+ ### Other Known Limitations
125
+
126
+ [More Information Needed]
127
+
128
+ ## Additional Information
129
+
130
+ ### Dataset Curators
131
+
132
+ [More Information Needed]
133
+
134
+ ### Licensing Information
135
+
136
+ [More Information Needed]
137
+
138
+ ### Citation Information
139
+
140
+ [More Information Needed]
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"plain_text": {"description": "DREAM is a multiple-choice Dialogue-based REAding comprehension exaMination dataset. In contrast to existing reading comprehension datasets, DREAM is the first to focus on in-depth multi-turn multi-party dialogue understanding.\n", "citation": "@article{sundream2018,\n title={{DREAM}: A Challenge Dataset and Models for Dialogue-Based Reading Comprehension},\n author={Sun, Kai and Yu, Dian and Chen, Jianshu and Yu, Dong and Choi, Yejin and Cardie, Claire},\n journal={Transactions of the Association for Computational Linguistics},\n year={2019},\n url={https://arxiv.org/abs/1902.00164v1}\n}\n", "homepage": "https://dataset.org/dream/", "license": "", "features": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "dialogue_id": {"dtype": "string", "id": null, "_type": "Value"}, "dialogue": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "choice": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "answer": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "dream", "config_name": "plain_text", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 4775235, "num_examples": 6116, "dataset_name": "dream"}, "validation": {"name": "validation", "num_bytes": 1539272, "num_examples": 2040, "dataset_name": "dream"}, "test": {"name": "test", "num_bytes": 1556379, "num_examples": 2041, "dataset_name": "dream"}}, "download_checksums": {"https://raw.githubusercontent.com/nlpdata/dream/master/data/train.json": {"num_bytes": 3355481, "checksum": "90942ddea1b56231a0ad2097dc5f115ce1face1cfb86f029041e5bad38e68566"}, "https://raw.githubusercontent.com/nlpdata/dream/master/data/dev.json": {"num_bytes": 1097827, "checksum": "9d5af2e580d809c73872a7dd43fe93d0b07c6f6086b04a9a9a1917603009d961"}, "https://raw.githubusercontent.com/nlpdata/dream/master/data/test.json": {"num_bytes": 1104882, "checksum": "d96d7d0752f7eab1ea8f165a582430f35653c428d36633ab4d7f26fc14946c3a"}}, "download_size": 5558190, "post_processing_size": null, "dataset_size": 7870886, "size_in_bytes": 13429076}}
dream.py ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 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
+ """DREAM: A Challenge Dataset and Models for Dialogue-Based Reading Comprehension"""
18
+
19
+ from __future__ import absolute_import, division, print_function
20
+
21
+ import json
22
+ import logging
23
+
24
+ import datasets
25
+
26
+
27
+ _CITATION = """\
28
+ @article{sundream2018,
29
+ title={{DREAM}: A Challenge Dataset and Models for Dialogue-Based Reading Comprehension},
30
+ author={Sun, Kai and Yu, Dian and Chen, Jianshu and Yu, Dong and Choi, Yejin and Cardie, Claire},
31
+ journal={Transactions of the Association for Computational Linguistics},
32
+ year={2019},
33
+ url={https://arxiv.org/abs/1902.00164v1}
34
+ }
35
+ """
36
+
37
+ _DESCRIPTION = """\
38
+ DREAM is a multiple-choice Dialogue-based REAding comprehension exaMination dataset. \
39
+ In contrast to existing reading comprehension datasets, DREAM is the first to focus on \
40
+ in-depth multi-turn multi-party dialogue understanding.
41
+ """
42
+
43
+ _URL = "https://raw.githubusercontent.com/nlpdata/dream/master/data/"
44
+ _URLS = {
45
+ "train": _URL + "train.json",
46
+ "dev": _URL + "dev.json",
47
+ "test": _URL + "test.json",
48
+ }
49
+
50
+
51
+ class DreamConfig(datasets.BuilderConfig):
52
+ """BuilderConfig for Dream."""
53
+
54
+ def __init__(self, **kwargs):
55
+ """BuilderConfig for Dream.
56
+
57
+ Args:
58
+ **kwargs: keyword arguments forwarded to super.
59
+ """
60
+ super(DreamConfig, self).__init__(**kwargs)
61
+
62
+
63
+ class Dream(datasets.GeneratorBasedBuilder):
64
+ """DREAM: A Challenge Dataset and Models for Dialogue-Based Reading Comprehension"""
65
+
66
+ VERSION = datasets.Version("1.0.0")
67
+
68
+ BUILDER_CONFIGS = [
69
+ DreamConfig(
70
+ name="plain_text",
71
+ version=datasets.Version("1.0.0"),
72
+ description="plain_text",
73
+ ),
74
+ ]
75
+
76
+ def _info(self):
77
+ return datasets.DatasetInfo(
78
+ description=_DESCRIPTION,
79
+ features=datasets.Features(
80
+ {
81
+ "id": datasets.Value("int32"),
82
+ "dialogue_id": datasets.Value("string"),
83
+ "dialogue": datasets.Sequence(datasets.Value("string")),
84
+ "question": datasets.Value("string"),
85
+ "choice": datasets.features.Sequence(datasets.Value("string")),
86
+ "answer": datasets.Value("string"),
87
+ }
88
+ ),
89
+ supervised_keys=None,
90
+ homepage="https://dataset.org/dream/",
91
+ citation=_CITATION,
92
+ )
93
+
94
+ def _split_generators(self, dl_manager):
95
+ """Returns SplitGenerators."""
96
+ downloaded_files = dl_manager.download_and_extract(_URLS)
97
+
98
+ return [
99
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"]}),
100
+ datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": downloaded_files["dev"]}),
101
+ datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_files["test"]}),
102
+ ]
103
+
104
+ def _generate_examples(self, filepath):
105
+ """This function returns the examples in the raw (text) form."""
106
+ logging.info("⏳ Generating examples from = %s", filepath)
107
+ with open(filepath, encoding="utf-8") as f:
108
+ dialogues = json.load(f)
109
+ counter = 0
110
+ for dialogue in dialogues:
111
+ dialogue_text = dialogue[0]
112
+ questions = dialogue[1]
113
+ dialogue_id = dialogue[2]
114
+
115
+ for que in questions:
116
+ yield counter, {
117
+ "id": counter,
118
+ "dialogue_id": dialogue_id,
119
+ "dialogue": dialogue_text,
120
+ "question": que["question"],
121
+ "choice": que["choice"],
122
+ "answer": que["answer"],
123
+ }
124
+ counter += 1
dummy/plain_text/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:240ac202974016d38b9889434758a3b248adaaac9b8392d37d3afc2f9689c092
3
+ size 4544