system HF staff commited on
Commit
05a98c8
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

Files changed (5) hide show
  1. .gitattributes +27 -0
  2. README.md +218 -0
  3. circa.py +154 -0
  4. dataset_infos.json +1 -0
  5. dummy/1.1.0/dummy_data.zip +3 -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,218 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - crowdsourced
6
+ languages:
7
+ - en
8
+ licenses:
9
+ - cc-by-4-0
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 10K<n<100K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - text-classification
18
+ task_ids:
19
+ - multi-class-classification
20
+ - text-classification-other-question-answer-pair-classification
21
+ ---
22
+
23
+ # Dataset Card Creation Guide
24
+
25
+ ## Table of Contents
26
+ - [Dataset Description](#dataset-description)
27
+ - [Dataset Summary](#dataset-summary)
28
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
29
+ - [Languages](#languages)
30
+ - [Dataset Structure](#dataset-structure)
31
+ - [Data Instances](#data-instances)
32
+ - [Data Fields](#data-instances)
33
+ - [Data Splits](#data-instances)
34
+ - [Dataset Creation](#dataset-creation)
35
+ - [Curation Rationale](#curation-rationale)
36
+ - [Source Data](#source-data)
37
+ - [Annotations](#annotations)
38
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
39
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
40
+ - [Social Impact of Dataset](#social-impact-of-dataset)
41
+ - [Discussion of Biases](#discussion-of-biases)
42
+ - [Other Known Limitations](#other-known-limitations)
43
+ - [Additional Information](#additional-information)
44
+ - [Dataset Curators](#dataset-curators)
45
+ - [Licensing Information](#licensing-information)
46
+ - [Citation Information](#citation-information)
47
+
48
+ ## Dataset Description
49
+
50
+ - **Homepage:** [CIRCA homepage](https://github.com/google-research-datasets/circa)
51
+ - **Repository:** [CIRCA repository](https://github.com/google-research-datasets/circa)
52
+ - **Paper:** ["I’d rather just go to bed”: Understanding Indirect Answers](https://arxiv.org/abs/2010.03450)
53
+ - **Point of Contact:** [Circa team, Google](circa@google.com)
54
+
55
+ ### Dataset Summary
56
+
57
+ The Circa (meaning ‘approximately’) dataset aims to help machine learning systems to solve the problem of interpreting indirect answers to polar questions.
58
+
59
+ The dataset contains pairs of yes/no questions and indirect answers, together with annotations for the interpretation of the answer. The data is collected in 10 different social conversational situations (eg. food preferences of a friend).
60
+
61
+ The following are the situational contexts for the dialogs in the data.
62
+
63
+ ```
64
+ 1. X wants to know about Y’s food preferences
65
+ 2. X wants to know what activities Y likes to do during weekends.
66
+ 3. X wants to know what sorts of books Y likes to read.
67
+ 4. Y has just moved into a neighbourhood and meets his/her new neighbour X.
68
+ 5. X and Y are colleagues who are leaving work on a Friday at the same time.
69
+ 6. X wants to know about Y's music preferences.
70
+ 7. Y has just travelled from a different city to meet X.
71
+ 8. X and Y are childhood neighbours who unexpectedly run into each other at a cafe.
72
+ 9. Y has just told X that he/she is thinking of buying a flat in New York.
73
+ 10. Y has just told X that he/she is considering switching his/her job.
74
+ ```
75
+
76
+ ### Supported Tasks and Leaderboards
77
+
78
+ [More Information Needed]
79
+
80
+ ### Languages
81
+
82
+ The text in the dataset is in English.
83
+
84
+ ## Dataset Structure
85
+
86
+ ### Data Instances
87
+
88
+ The columns indicate:
89
+
90
+ ```
91
+ 1. id : unique id for the question-answer pair
92
+
93
+ 2. context : the social situation for the dialogue. One of 10 situations (see next section). Each
94
+ situation is a dialogue between a person who poses the question (X) and the person who
95
+ answers (Y).
96
+
97
+ 3. question-X : the question posed by X
98
+
99
+ 4. canquestion-X : a (automatically) rewritten version of question into declarative form
100
+ Eg. Do you like Italian? --> I like Italian. See the paper for details.
101
+
102
+ 5. answer-Y : the answer given by Y to X
103
+
104
+ 6. judgements : the interpretations for the QA pair from 5 annotators. The value is a list of 5 strings,
105
+ separated by the token ‘#’
106
+
107
+ 7. goldstandard1 : a gold standard majority judgement from the annotators. The value is the most common
108
+ interpretation and picked by at least 3 (out of 5 annotators). When a majority
109
+ judgement was not reached by the above criteria, the value is ‘NA’
110
+
111
+ 8. goldstandard2 : Here the labels ‘Probably yes / sometimes yes’, ‘Probably no', and 'I am not sure how
112
+ X will interpret Y’s answer' are mapped respectively to ‘Yes’, ‘No’, and 'In the
113
+ middle, neither yes nor no’ before computing the majority. Still the label must be given
114
+ at least 3 times to become the majority choice. This method represents a less strict way
115
+ of analyzing the interpretations.
116
+ ```
117
+
118
+ ### Data Fields
119
+
120
+ ```
121
+ id : 1
122
+ context : X wants to know about Y's food preferences.
123
+ question-X : Are you vegan?
124
+ canquestion-X : I am vegan.
125
+ answer-Y : I love burgers too much.
126
+ judgements : no#no#no#no#no
127
+ goldstandard1 : no (label(s) used for the classification task)
128
+ goldstandard2 : no (label(s) used for the classification task)
129
+ ```
130
+
131
+ ### Data Splits
132
+
133
+ There are no explicit train/val/test splits in this dataset.
134
+
135
+ ## Dataset Creation
136
+
137
+ ### Curation Rationale
138
+
139
+ They revisited a pragmatic inference problem in dialog: Understanding indirect responses to questions. Humans can interpret ‘I’m starving.’ in response to ‘Hungry?’, even without direct cue words such as ‘yes’ and ‘no’. In dialog systems, allowing natural responses rather than closed vocabularies would be similarly beneficial. However, today’s systems are only as sensitive to these pragmatic moves as their language model allows. They create and release the first large-scale English language corpus ‘Circa’ with 34,268 (polar question, indirect answer) pairs to enable progress on this task.
140
+
141
+ ### Source Data
142
+
143
+ #### Initial Data Collection and Normalization
144
+
145
+ The QA pairs and judgements were collected using crowd annotations in three phases. They recruited English native speakers. The full descriptions of the data collection and quality control are present in [EMNLP 2020 paper](https://arxiv.org/pdf/2010.03450.pdf). Below is a brief overview only.
146
+
147
+ Phase 1: In the first phase, they collected questions only. They designed 10 imaginary social situations which give the annotator a context for the conversation. Examples are:
148
+ ```
149
+ ‘asking a friend for food preferences’
150
+ ‘meeting your childhood neighbour’
151
+ ‘your friend wants to buy a flat in New York’
152
+ ```
153
+ Annotators were asked to suggest questions which could be asked in each situation, such that each question only requires a ‘yes’ or ‘no’ answer. 100 annotators produced 5 questions each for the 10 situations, resulting in 5000 questions.
154
+
155
+ Phase 2: Here they focused on eliciting answers to the questions. They sampled 3500 questions from our previous set. For each question, They collected possible answers from 10 different annotators. The annotators were instructed to provide a natural phrase or a sentence as the answer and to avoid the use of explicit ‘yes’ and ‘no’ words.
156
+
157
+ Phase 3: Finally the QA pairs (34,268) were given to a third set of annotators who were asked how the question seeker would likely interpret a particular answer. These annotators had the following options to choose from:
158
+ ```
159
+ * 'Yes'
160
+ * 'Probably yes' / 'sometimes yes'
161
+ * 'Yes, subject to some conditions'
162
+ * 'No'
163
+ * 'Probably no'
164
+ * 'In the middle, neither yes nor no'
165
+ * 'I am not sure how X will interpret Y's answer'
166
+ ```
167
+
168
+ #### Who are the source language producers?
169
+
170
+ The rest of the data apart from 10 initial questions was collected using crowd workers. They ran pilots for each step of data collection, and perused their results manually to ensure clarity in guidelines, and quality of the data. They also recruited native English speakers, mostly from the USA, and a few from the UK and Canada. They did not collect any further information about the crowd workers.
171
+
172
+ ### Annotations
173
+
174
+ #### Annotation process
175
+
176
+ [More Information Needed]
177
+
178
+ #### Who are the annotators?
179
+
180
+ The rest of the data apart from 10 initial questions was collected using crowd workers. They ran pilots for each step of data collection, and perused their results manually to ensure clarity in guidelines, and quality of the data. They also recruited native English speakers, mostly from the USA, and a few from the UK and Canada. They did not collect any further information about the crowd workers.
181
+
182
+ ### Personal and Sensitive Information
183
+
184
+ [More Information Needed]
185
+
186
+ ## Considerations for Using the Data
187
+
188
+ ### Social Impact of Dataset
189
+
190
+ [More Information Needed]
191
+
192
+ ### Discussion of Biases
193
+
194
+ [More Information Needed]
195
+
196
+ ### Other Known Limitations
197
+
198
+ [More Information Needed]
199
+
200
+ ## Additional Information
201
+
202
+ ### Dataset Curators
203
+
204
+ This dataset is the work of Annie Louis, Dan Roth, and Filip Radlinski from Google LLC.
205
+
206
+ ### Licensing Information
207
+
208
+ This dataset was made available under the Creative Commons Attribution 4.0 License. A full copy of the license can be found at https://creativecommons.org/licenses/by-sa/4.0/e and link to the license webpage if available.
209
+
210
+ ### Citation Information
211
+ ```
212
+ @InProceedings{louis_emnlp2020,
213
+ author = "Annie Louis and Dan Roth and Filip Radlinski",
214
+ title = ""{I}'d rather just go to bed": {U}nderstanding {I}ndirect {A}nswers",
215
+ booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing",
216
+ year = "2020",
217
+ }
218
+ ```
circa.py ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """Dataset containing polar questions and indirect answers."""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import csv
20
+
21
+ import datasets
22
+
23
+
24
+ _CITATION = """\
25
+ @InProceedings{louis_emnlp2020,
26
+ author = "Annie Louis and Dan Roth and Filip Radlinski",
27
+ title = ""{I}'d rather just go to bed": {U}nderstanding {I}ndirect {A}nswers",
28
+ booktitle = "Proceedings of the 2020 Conference on Empirical Methods
29
+ in Natural Language Processing",
30
+ year = "2020",
31
+ }
32
+ """
33
+
34
+ _DESCRIPTION = """\
35
+ The Circa (meaning ‘approximately’) dataset aims to help machine learning systems
36
+ to solve the problem of interpreting indirect answers to polar questions.
37
+
38
+ The dataset contains pairs of yes/no questions and indirect answers, together with
39
+ annotations for the interpretation of the answer. The data is collected in 10
40
+ different social conversational situations (eg. food preferences of a friend).
41
+
42
+ NOTE: There might be missing labels in the dataset and we have replaced them with -1.
43
+ The original dataset contains no train/dev/test splits.
44
+ """
45
+
46
+ _LICENSE = "Creative Commons Attribution 4.0 License"
47
+
48
+ _DATA_URL = "https://raw.githubusercontent.com/google-research-datasets/circa/main/circa-data.tsv"
49
+
50
+
51
+ class Circa(datasets.GeneratorBasedBuilder):
52
+ """Dataset containing polar questions and indirect answers."""
53
+
54
+ VERSION = datasets.Version("1.1.0")
55
+
56
+ def _info(self):
57
+ features = datasets.Features(
58
+ {
59
+ "context": datasets.Value("string"),
60
+ "question-X": datasets.Value("string"),
61
+ "canquestion-X": datasets.Value("string"),
62
+ "answer-Y": datasets.Value("string"),
63
+ "judgements": datasets.Value("string"),
64
+ "goldstandard1": datasets.features.ClassLabel(
65
+ names=[
66
+ "Yes",
67
+ "No",
68
+ "In the middle, neither yes nor no",
69
+ "Probably yes / sometimes yes",
70
+ "Probably no",
71
+ "Yes, subject to some conditions",
72
+ "Other",
73
+ "I am not sure how X will interpret Y’s answer",
74
+ ]
75
+ ),
76
+ "goldstandard2": datasets.features.ClassLabel(
77
+ names=[
78
+ "Yes",
79
+ "No",
80
+ "In the middle, neither yes nor no",
81
+ "Yes, subject to some conditions",
82
+ "Other",
83
+ ]
84
+ ),
85
+ }
86
+ )
87
+ return datasets.DatasetInfo(
88
+ # This is the description that will appear on the datasets page.
89
+ description=_DESCRIPTION,
90
+ # This defines the different columns of the dataset and their types
91
+ features=features, # Here we define them above because they are different between the two configurations
92
+ # If there's a common (input, target) tuple from the features,
93
+ # specify them here. They'll be used if as_supervised=True in
94
+ # builder.as_dataset.
95
+ supervised_keys=None,
96
+ # Homepage of the dataset for documentation
97
+ homepage="https://github.com/google-research-datasets/circa",
98
+ # License for the dataset if available
99
+ license=_LICENSE,
100
+ # Citation for the dataset
101
+ citation=_CITATION,
102
+ )
103
+
104
+ def _split_generators(self, dl_manager):
105
+ train_path = dl_manager.download_and_extract(_DATA_URL)
106
+ return [
107
+ datasets.SplitGenerator(
108
+ name=datasets.Split.TRAIN,
109
+ # These kwargs will be passed to _generate_examples
110
+ gen_kwargs={
111
+ "filepath": train_path,
112
+ "split": datasets.Split.TRAIN,
113
+ },
114
+ ),
115
+ ]
116
+
117
+ def _generate_examples(self, filepath, split):
118
+ with open(filepath, encoding="utf-8") as f:
119
+ goldstandard1_labels = [
120
+ "Yes",
121
+ "No",
122
+ "In the middle, neither yes nor no",
123
+ "Probably yes / sometimes yes",
124
+ "Probably no",
125
+ "Yes, subject to some conditions",
126
+ "Other",
127
+ "I am not sure how X will interpret Y’s answer",
128
+ ]
129
+ goldstandard2_labels = [
130
+ "Yes",
131
+ "No",
132
+ "In the middle, neither yes nor no",
133
+ "Yes, subject to some conditions",
134
+ "Other",
135
+ ]
136
+ data = csv.reader(f, delimiter="\t")
137
+ next(data, None) # skip the headers
138
+ for id_, row in enumerate(data):
139
+ row = [x if x != "nan" else -1 for x in row]
140
+ _, context, question_X, canquestion_X, answer_Y, judgements, goldstandard1, goldstandard2 = row
141
+ if goldstandard1 not in goldstandard1_labels:
142
+ goldstandard1 = -1
143
+ if goldstandard2 not in goldstandard2_labels:
144
+ goldstandard2 = -1
145
+
146
+ yield id_, {
147
+ "context": context,
148
+ "question-X": question_X,
149
+ "canquestion-X": canquestion_X,
150
+ "answer-Y": answer_Y,
151
+ "judgements": judgements,
152
+ "goldstandard1": goldstandard1,
153
+ "goldstandard2": goldstandard2,
154
+ }
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"default": {"description": "The Circa (meaning \u2018approximately\u2019) dataset aims to help machine learning systems\nto solve the problem of interpreting indirect answers to polar questions.\n\nThe dataset contains pairs of yes/no questions and indirect answers, together with\nannotations for the interpretation of the answer. The data is collected in 10\ndifferent social conversational situations (eg. food preferences of a friend).\n\nNOTE: There might be missing labels in the dataset and we have replaced them with -1.\nThe original dataset contains no train/dev/test splits.\n", "citation": "@InProceedings{louis_emnlp2020,\n author = \"Annie Louis and Dan Roth and Filip Radlinski\",\n title = \"\"{I}'d rather just go to bed\": {U}nderstanding {I}ndirect {A}nswers\",\n booktitle = \"Proceedings of the 2020 Conference on Empirical Methods\n in Natural Language Processing\",\n year = \"2020\",\n}\n", "homepage": "https://github.com/google-research-datasets/circa", "license": "Creative Commons Attribution 4.0 License", "features": {"context": {"dtype": "string", "id": null, "_type": "Value"}, "question-X": {"dtype": "string", "id": null, "_type": "Value"}, "canquestion-X": {"dtype": "string", "id": null, "_type": "Value"}, "answer-Y": {"dtype": "string", "id": null, "_type": "Value"}, "judgements": {"dtype": "string", "id": null, "_type": "Value"}, "goldstandard1": {"num_classes": 8, "names": ["Yes", "No", "In the middle, neither yes nor no", "Probably yes / sometimes yes", "Probably no", "Yes, subject to some conditions", "Other", "I am not sure how X will interpret Y\u2019s answer"], "names_file": null, "id": null, "_type": "ClassLabel"}, "goldstandard2": {"num_classes": 5, "names": ["Yes", "No", "In the middle, neither yes nor no", "Yes, subject to some conditions", "Other"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "circa", "config_name": "default", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 8149489, "num_examples": 34268, "dataset_name": "circa"}}, "download_checksums": {"https://raw.githubusercontent.com/google-research-datasets/circa/main/circa-data.tsv": {"num_bytes": 7766077, "checksum": "98454df6b716dd7ff5f83a3db298849f05414688e81c2ee21b8e5a548ed897aa"}}, "download_size": 7766077, "post_processing_size": null, "dataset_size": 8149489, "size_in_bytes": 15915566}}
dummy/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c73c1e78cc3816905f45d7d129e11459fd86f2bdb7b50474d2610ca3707f446
3
+ size 689