system HF staff commited on
Commit
aae87bb
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,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - en
8
+ licenses:
9
+ - cc-by-sa-4-0
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - n<1K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - other
18
+ task_ids:
19
+ - other-other-Coached Conversation Preference
20
+ ---
21
+
22
+ # Dataset Card for Coached Conversational Preference Elicitation
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:** [Google Research](https://research.google/tools/datasets/coached-conversational-preference-elicitation/)
50
+ - **Repository:**
51
+ - **Paper:** [Aclweb](https://www.aclweb.org/anthology/W19-5941/)
52
+ - **Leaderboard:**
53
+ - **Point of Contact:**
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
+ Each conversation has the following fields:
76
+
77
+ * conversationId: A unique random ID for the conversation. The ID has no meaning.
78
+ * utterances: An array of utterances by the workers.
79
+
80
+ Each utterance has the following fields:
81
+
82
+ * index: A 0-based index indicating the order of the utterances in the conversation.
83
+ * speaker: Either USER or ASSISTANT, indicating which role generated this utterance.
84
+ * text: The raw text as written by the ASSISTANT, or transcribed from the spoken recording of USER.
85
+ * segments: An array of semantic annotations of spans in the text.
86
+
87
+ Each semantic annotation segment has the following fields:
88
+
89
+ * startIndex: The position of the start of the annotation in the utterance text.
90
+ * endIndex: The position of the end of the annotation in the utterance text.
91
+ * text: The raw text that has been annotated.
92
+ * annotations: An array of annotation details for this segment.
93
+
94
+ Each annotation has two fields:
95
+
96
+ * annotationType: The class of annotation (see ontology below).
97
+ * entityType: The class of the entity to which the text refers (see ontology below).
98
+
99
+ **EXPLANATION OF ONTOLOGY**
100
+
101
+ In the corpus, preferences and the entities that these preferences refer to are annotated with an annotation type as well as an entity type.
102
+
103
+ Annotation types fall into four categories:
104
+
105
+ * ENTITY_NAME: These mark the names of relevant entities mentioned.
106
+ * ENTITY_PREFERENCE: These are defined as statements indicating that the dialog participant does or does not like the relevant entity in general, or that they do or do not like some aspect of the entity. This may also be thought of the participant having some sentiment about what is being discussed.
107
+ * ENTITY_DESCRIPTION: Neutral descriptions that describe an entity but do not convey an explicit liking or disliking.
108
+ * ENTITY_OTHER: Other relevant statements about an entity that convey relevant information of how the participant relates to the entity but do not provide a sentiment. Most often, these relate to whether a participant has seen a particular movie, or knows a lot about a given entity.
109
+
110
+ Entity types are marked as belonging to one of four categories:
111
+
112
+ * MOVIE_GENRE_OR_CATEGORY for genres or general descriptions that capture a particular type or style of movie.
113
+ * MOVIE_OR_SERIES for the full or partial name of a movie or series of movies.
114
+ * PERSON for the full or partial name of an actual person.
115
+ * SOMETHING_ELSE for other important proper nouns, such as the names of characters or locations.
116
+
117
+
118
+ ### Data Splits
119
+
120
+ [More Information Needed]
121
+
122
+ ## Dataset Creation
123
+
124
+ ### Curation Rationale
125
+
126
+ [More Information Needed]
127
+
128
+ ### Source Data
129
+
130
+ #### Initial Data Collection and Normalization
131
+
132
+ [More Information Needed]
133
+
134
+ #### Who are the source language producers?
135
+
136
+ [More Information Needed]
137
+
138
+ ### Annotations
139
+
140
+ #### Annotation process
141
+
142
+ [More Information Needed]
143
+
144
+ #### Who are the annotators?
145
+
146
+ [More Information Needed]
147
+
148
+ ### Personal and Sensitive Information
149
+
150
+ [More Information Needed]
151
+
152
+ ## Considerations for Using the Data
153
+
154
+ ### Social Impact of Dataset
155
+
156
+ [More Information Needed]
157
+
158
+ ### Discussion of Biases
159
+
160
+ [More Information Needed]
161
+
162
+ ### Other Known Limitations
163
+
164
+ [More Information Needed]
165
+
166
+ ## Additional Information
167
+
168
+ ### Dataset Curators
169
+
170
+ [More Information Needed]
171
+
172
+ ### Licensing Information
173
+
174
+ [More Information Needed]
175
+
176
+ ### Citation Information
177
+
178
+ [More Information Needed]
coached_conv_pref.py ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """Coached Conversational Preference Elicitation Dataset to Understanding Movie Preferences"""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import json
20
+ import os
21
+
22
+ import datasets
23
+
24
+
25
+ _CITATION = """\
26
+ @inproceedings{48414,
27
+ title = {Coached Conversational Preference Elicitation: A Case Study in Understanding Movie Preferences},
28
+ author = {Filip Radlinski and Krisztian Balog and Bill Byrne and Karthik Krishnamoorthi},
29
+ year = {2019},
30
+ booktitle = {Proceedings of the Annual SIGdial Meeting on Discourse and Dialogue}
31
+ }
32
+ """
33
+
34
+ _DESCRIPTION = """\
35
+ A dataset consisting of 502 English dialogs with 12,000 annotated utterances between a user and an assistant discussing
36
+ movie preferences in natural language. It was collected using a Wizard-of-Oz methodology between two paid crowd-workers,
37
+ where one worker plays the role of an 'assistant', while the other plays the role of a 'user'. The 'assistant' elicits
38
+ the 'user’s' preferences about movies following a Coached Conversational Preference Elicitation (CCPE) method. The
39
+ assistant asks questions designed to minimize the bias in the terminology the 'user' employs to convey his or her
40
+ preferences as much as possible, and to obtain these preferences in natural language. Each dialog is annotated with
41
+ entity mentions, preferences expressed about entities, descriptions of entities provided, and other statements of
42
+ entities."""
43
+
44
+ _HOMEPAGE = "https://research.google/tools/datasets/coached-conversational-preference-elicitation/"
45
+
46
+ _LICENSE = "https://creativecommons.org/licenses/by-sa/4.0/"
47
+
48
+ _URLs = {"dataset": "https://storage.googleapis.com/dialog-data-corpus/CCPE-M-2019/data.json"}
49
+
50
+
51
+ class CoachedConvPrefConfig(datasets.BuilderConfig):
52
+ """BuilderConfig for DialogRE"""
53
+
54
+ def __init__(self, **kwargs):
55
+ """BuilderConfig for DialogRE.
56
+ Args:
57
+ **kwargs: keyword arguments forwarded to super.
58
+ """
59
+ super(CoachedConvPrefConfig, self).__init__(**kwargs)
60
+
61
+
62
+ class CoachedConvPref(datasets.GeneratorBasedBuilder):
63
+ """Coached Conversational Preference Elicitation Dataset to Understanding Movie Preferences"""
64
+
65
+ VERSION = datasets.Version("1.1.0")
66
+
67
+ BUILDER_CONFIGS = [
68
+ CoachedConvPrefConfig(
69
+ name="coached_conv_pref",
70
+ version=datasets.Version("1.1.0"),
71
+ description="Coached Conversational Preference Elicitation Dataset to Understanding Movie Preferences",
72
+ ),
73
+ ]
74
+
75
+ def _info(self):
76
+ return datasets.DatasetInfo(
77
+ description=_DESCRIPTION,
78
+ features=datasets.Features(
79
+ {
80
+ "conversationId": datasets.Value("string"),
81
+ "utterances": datasets.Sequence(
82
+ {
83
+ "index": datasets.Value("int32"),
84
+ "speaker": datasets.features.ClassLabel(names=["USER", "ASSISTANT"]),
85
+ "text": datasets.Value("string"),
86
+ "segments": datasets.Sequence(
87
+ {
88
+ "startIndex": datasets.Value("int32"),
89
+ "endIndex": datasets.Value("int32"),
90
+ "text": datasets.Value("string"),
91
+ "annotations": datasets.Sequence(
92
+ {
93
+ "annotationType": datasets.features.ClassLabel(
94
+ names=[
95
+ "ENTITY_NAME",
96
+ "ENTITY_PREFERENCE",
97
+ "ENTITY_DESCRIPTION",
98
+ "ENTITY_OTHER",
99
+ ]
100
+ ),
101
+ "entityType": datasets.features.ClassLabel(
102
+ names=[
103
+ "MOVIE_GENRE_OR_CATEGORY",
104
+ "MOVIE_OR_SERIES",
105
+ "PERSON",
106
+ "SOMETHING_ELSE",
107
+ ]
108
+ ),
109
+ }
110
+ ),
111
+ }
112
+ ),
113
+ }
114
+ ),
115
+ }
116
+ ),
117
+ supervised_keys=None,
118
+ homepage=_HOMEPAGE,
119
+ license=_LICENSE,
120
+ citation=_CITATION,
121
+ )
122
+
123
+ def _split_generators(self, dl_manager):
124
+ """Returns SplitGenerators."""
125
+
126
+ data_dir = dl_manager.download_and_extract(_URLs)
127
+
128
+ # Dataset is a single corpus (does not contain any split)
129
+ return [
130
+ datasets.SplitGenerator(
131
+ name=datasets.Split.TRAIN,
132
+ gen_kwargs={
133
+ "filepath": os.path.join(data_dir["dataset"]),
134
+ "split": "train",
135
+ },
136
+ ),
137
+ ]
138
+
139
+ def _generate_examples(self, filepath, split):
140
+ """ Yields examples. """
141
+
142
+ # Empty Segment list with annotations dictionary
143
+ # First prompt of a conversation does not contain the segment dictionary
144
+ # We are setting it to None values
145
+ segments_empty = [
146
+ {
147
+ "startIndex": 0,
148
+ "endIndex": 0,
149
+ "text": "",
150
+ "annotations": [],
151
+ }
152
+ ]
153
+
154
+ with open(filepath, encoding="utf-8") as f:
155
+ dataset = json.load(f)
156
+
157
+ for id_, data in enumerate(dataset):
158
+ conversationId = data["conversationId"]
159
+
160
+ utterances = data["utterances"]
161
+ for utterance in utterances:
162
+ if "segments" not in utterance:
163
+ utterance["segments"] = segments_empty.copy()
164
+
165
+ yield id_, {
166
+ "conversationId": conversationId,
167
+ "utterances": utterances,
168
+ }
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"coached_conv_pref": {"description": "A dataset consisting of 502 English dialogs with 12,000 annotated utterances between a user and an assistant discussing\nmovie preferences in natural language. It was collected using a Wizard-of-Oz methodology between two paid crowd-workers,\nwhere one worker plays the role of an 'assistant', while the other plays the role of a 'user'. The 'assistant' elicits\nthe 'user\u2019s' preferences about movies following a Coached Conversational Preference Elicitation (CCPE) method. The\nassistant asks questions designed to minimize the bias in the terminology the 'user' employs to convey his or her\npreferences as much as possible, and to obtain these preferences in natural language. Each dialog is annotated with\nentity mentions, preferences expressed about entities, descriptions of entities provided, and other statements of\nentities.", "citation": "@inproceedings{48414,\ntitle\t= {Coached Conversational Preference Elicitation: A Case Study in Understanding Movie Preferences},\nauthor\t= {Filip Radlinski and Krisztian Balog and Bill Byrne and Karthik Krishnamoorthi},\nyear\t= {2019},\nbooktitle\t= {Proceedings of the Annual SIGdial Meeting on Discourse and Dialogue}\n}\n", "homepage": "https://research.google/tools/datasets/coached-conversational-preference-elicitation/", "license": "https://creativecommons.org/licenses/by-sa/4.0/", "features": {"conversationId": {"dtype": "string", "id": null, "_type": "Value"}, "utterances": {"feature": {"index": {"dtype": "int32", "id": null, "_type": "Value"}, "speaker": {"num_classes": 2, "names": ["USER", "ASSISTANT"], "names_file": null, "id": null, "_type": "ClassLabel"}, "text": {"dtype": "string", "id": null, "_type": "Value"}, "segments": {"feature": {"startIndex": {"dtype": "int32", "id": null, "_type": "Value"}, "endIndex": {"dtype": "int32", "id": null, "_type": "Value"}, "text": {"dtype": "string", "id": null, "_type": "Value"}, "annotations": {"feature": {"annotationType": {"num_classes": 4, "names": ["ENTITY_NAME", "ENTITY_PREFERENCE", "ENTITY_DESCRIPTION", "ENTITY_OTHER"], "names_file": null, "id": null, "_type": "ClassLabel"}, "entityType": {"num_classes": 4, "names": ["MOVIE_GENRE_OR_CATEGORY", "MOVIE_OR_SERIES", "PERSON", "SOMETHING_ELSE"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "length": -1, "id": null, "_type": "Sequence"}}, "length": -1, "id": null, "_type": "Sequence"}}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "coached_conv_pref", "config_name": "coached_conv_pref", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 2295579, "num_examples": 502, "dataset_name": "coached_conv_pref"}}, "download_checksums": {"https://storage.googleapis.com/dialog-data-corpus/CCPE-M-2019/data.json": {"num_bytes": 5191959, "checksum": "4ff051ea7ea60cf0f480c911c7e2cfed56434e2e2c9ea8965ac5e26365773f0a"}}, "download_size": 5191959, "post_processing_size": null, "dataset_size": 2295579, "size_in_bytes": 7487538}}
dummy/coached_conv_pref/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6eccf20c61647c906b137782c15656a3c3a1a83f4ace0b5bfa40a23fa8554121
3
+ size 2726