system HF staff commited on
Commit
8fd6c17
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,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - human-annotated
4
+ language_creators:
5
+ - machine-generated
6
+ languages:
7
+ - en
8
+ licenses:
9
+ - cc-by-nc-4-0
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 100K<n<1M
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - conditional-text-generation
18
+ - sequence-modeling
19
+ task_ids:
20
+ - conditional-text-generation-other-dialogue-generation
21
+ - dialogue-modeling
22
+ - language-modeling
23
+ ---
24
+
25
+ # Dataset Card for air_dialogue
26
+
27
+ ## Table of Contents
28
+ - [Dataset Description](#dataset-description)
29
+ - [Dataset Summary](#dataset-summary)
30
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
31
+ - [Languages](#languages)
32
+ - [Dataset Structure](#dataset-structure)
33
+ - [Data Instances](#data-instances)
34
+ - [Data Fields](#data-instances)
35
+ - [Data Splits](#data-instances)
36
+ - [Dataset Creation](#dataset-creation)
37
+ - [Curation Rationale](#curation-rationale)
38
+ - [Source Data](#source-data)
39
+ - [Annotations](#annotations)
40
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
41
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
42
+ - [Social Impact of Dataset](#social-impact-of-dataset)
43
+ - [Discussion of Biases](#discussion-of-biases)
44
+ - [Other Known Limitations](#other-known-limitations)
45
+ - [Additional Information](#additional-information)
46
+ - [Dataset Curators](#dataset-curators)
47
+ - [Licensing Information](#licensing-information)
48
+ - [Citation Information](#citation-information)
49
+
50
+ ## Dataset Description
51
+
52
+ - **Homepage:** https://worksheets.codalab.org/worksheets/0xa79833f4b3c24f4188cee7131b120a59
53
+ - **Repository:** https://github.com/google/airdialogue
54
+ - **Paper:** https://www.aclweb.org/anthology/D18-1419/
55
+ - **Leaderboard:** https://worksheets.codalab.org/worksheets/0xa79833f4b3c24f4188cee7131b120a59
56
+ - **Point of Contact:** [AirDialogue-Google](mailto:airdialogue@gmail.com)
57
+ [Aakash Gupta](mailto:aakashg80@gmail.com)
58
+
59
+ ### Dataset Summary
60
+
61
+ AirDialogue, is a large dataset that contains 402,038 goal-oriented conversations. To collect this dataset, we create a contextgenerator which provides travel and flight restrictions. Then the human annotators are asked to play the role of a customer or an agent and interact with the goal of successfully booking a trip given the restrictions.
62
+
63
+ ### Supported Tasks and Leaderboards
64
+
65
+ We use perplexity and BLEU score to evaluate the quality of the language generated by the model. We also compare the dialogue state generated by the model s and the ground truth state s0. Two categories of the metrics are used: exact match scores and scaled scores
66
+
67
+ The inference competition & leaderboard can be found here:
68
+ https://worksheets.codalab.org/worksheets/0xa79833f4b3c24f4188cee7131b120a59
69
+
70
+
71
+
72
+ ### Languages
73
+
74
+ The text in the dataset is in English. The BCP 47 code is `en`
75
+
76
+ ## Dataset Structure
77
+
78
+ ### Data Instances
79
+
80
+ The data is provided in two set of files. The first one has the dialogues (`air_dialogue_data`) and the knowledge-base (`air_dialogue_kb`)
81
+
82
+
83
+ BuilderConfig: `air_dialogue_data`
84
+
85
+ ```
86
+ {"action": {"status": "book", "name": "Emily Edwards", "flight": [1027]}, "intent": {"return_month": "June", "return_day": "14", "max_price": 200, "departure_airport": "DFW", "return_time": "afternoon", "max_connections": 1, "departure_day": "12", "goal": "book", "departure_month": "June", "name": "Emily Edwards", "return_airport": "IAD"}, "timestamps": [1519233239, 1519233244, 1519233249, 1519233252, 1519233333, 1519233374, 1519233392, 1519233416, 1519233443, 1519233448, 1519233464, 1519233513, 1519233525, 1519233540, 1519233626, 1519233628, 1519233638], "dialogue": ["customer: Hello.", "agent: Hello.", "customer: My name is Emily Edwards.", "agent: How may I help you out?", "customer: I need some help in my flight ticket reservation to attend a convocation meeting, can you please help me?", "agent: Sure, I will help you out. May I know your travelling dates please?", "customer: Thank you and my dates are 06/12 and back on 06/14.", "agent: Can I know your airport codes?", "customer: The airport codes are from DFW to IAD.", "agent: Ok, please wait a moment.", "customer: Sure.", "agent: There is a flight with connection 1 and price 200, can I proceed with this flight?", "customer: Yes, do proceed with booking.", "agent: Ok, your ticket has been booked.", "customer: Thank you for your assistance in my flight ticket reservation.", "agent: Thank you for choosing us.", "customer: You are welcome."], "expected_action": {"status": "book", "name": "Emily Edwards", "flight": [1027]}, "correct_sample": true}
87
+ ```
88
+
89
+ BuilderConfig: `air_dialogue_kb`
90
+
91
+ ```
92
+ {"kb": [{"return_airport": "DTW", "airline": "Spirit", "departure_day": "12", "departure_airport": "IAD", "flight_number": 1000, "departure_month": "June", "departure_time_num": 17, "class": "economy", "return_time_num": 2, "return_month": "June", "return_day": "14", "num_connections": 1, "price": 200}, {"return_airport": "DTW", "airline": "Frontier", "departure_day": "12", "departure_airport": "IAD", "flight_number": 1001, "departure_month": "June", "departure_time_num": 0, "class": "business", "return_time_num": 15, "return_month": "June", "return_day": "13", "num_connections": 0, "price": 500}, {"return_airport": "DTW", "airline": "JetBlue", "departure_day": "12", "departure_airport": "IAD", "flight_number": 1002, "departure_month": "June", "departure_time_num": 0, "class": "business", "return_time_num": 13, "return_month": "June", "return_day": "13", "num_connections": 1, "price": 600}, {"return_airport": "IAD", "airline": "Hawaiian", "departure_day": "12", "departure_airport": "DTW", "flight_number": 1003, "departure_month": "June", "departure_time_num": 6, "class": "economy", "return_time_num": 5, "return_month": "June", "return_day": "14", "num_connections": 1, "price": 200}, {"return_airport": "DFW", "airline": "AA", "departure_day": "12", "departure_airport": "DTW", "flight_number": 1004, "departure_month": "June", "departure_time_num": 9, "class": "economy", "return_time_num": 11, "return_month": "June", "return_day": "14", "num_connections": 1, "price": 100}, {"return_airport": "IAD", "airline": "AA", "departure_day": "12", "departure_airport": "DFW", "flight_number": 1005, "departure_month": "June", "departure_time_num": 3, "class": "economy", "return_time_num": 17, "return_month": "June", "return_day": "13", "num_connections": 1, "price": 100}, {"return_airport": "DTW", "airline": "Frontier", "departure_day": "12", "departure_airport": "IAD", "flight_number": 1006, "departure_month": "June", "departure_time_num": 10, "class": "economy", "return_time_num": 10, "return_month": "June", "return_day": "14", "num_connections": 1, "price": 100}, {"return_airport": "IAD", "airline": "UA", "departure_day": "12", "departure_airport": "DFW", "flight_number": 1007, "departure_month": "June", "departure_time_num": 14, "class": "economy", "return_time_num": 20, "return_month": "June", "return_day": "13", "num_connections": 1, "price": 100}, {"return_airport": "DFW", "airline": "AA", "departure_day": "13", "departure_airport": "DTW", "flight_number": 1008, "departure_month": "June", "departure_time_num": 6, "class": "economy", "return_time_num": 8, "return_month": "June", "return_day": "14", "num_connections": 2, "price": 400}, {"return_airport": "DFW", "airline": "Delta", "departure_day": "12", "departure_airport": "IAD", "flight_number": 1009, "departure_month": "June", "departure_time_num": 18, "class": "economy", "return_time_num": 6, "return_month": "June", "return_day": "14", "num_connections": 1, "price": 200}, {"return_airport": "DFW", "airline": "Frontier", "departure_day": "13", "departure_airport": "DTW", "flight_number": 1010, "departure_month": "June", "departure_time_num": 4, "class": "economy", "return_time_num": 2, "return_month": "June", "return_day": "14", "num_connections": 1, "price": 100}, {"return_airport": "DFW", "airline": "Southwest", "departure_day": "12", "departure_airport": "DTW", "flight_number": 1011, "departure_month": "June", "departure_time_num": 17, "class": "economy", "return_time_num": 22, "return_month": "June", "return_day": "13", "num_connections": 0, "price": 100}, {"return_airport": "DTW", "airline": "JetBlue", "departure_day": "11", "departure_airport": "DFW", "flight_number": 1012, "departure_month": "June", "departure_time_num": 13, "class": "economy", "return_time_num": 22, "return_month": "June", "return_day": "13", "num_connections": 1, "price": 100}, {"return_airport": "DTW", "airline": "Southwest", "departure_day": "12", "departure_airport": "IAD", "flight_number": 1013, "departure_month": "June", "departure_time_num": 16, "class": "economy", "return_time_num": 13, "return_month": "June", "return_day": "14", "num_connections": 1, "price": 200}, {"return_airport": "DTW", "airline": "Delta", "departure_day": "12", "departure_airport": "IAD", "flight_number": 1014, "departure_month": "June", "departure_time_num": 0, "class": "economy", "return_time_num": 8, "return_month": "June", "return_day": "15", "num_connections": 1, "price": 100}, {"return_airport": "DTW", "airline": "Southwest", "departure_day": "12", "departure_airport": "DFW", "flight_number": 1015, "departure_month": "June", "departure_time_num": 17, "class": "economy", "return_time_num": 1, "return_month": "June", "return_day": "15", "num_connections": 1, "price": 300}, {"return_airport": "DTW", "airline": "UA", "departure_day": "11", "departure_airport": "DFW", "flight_number": 1016, "departure_month": "June", "departure_time_num": 10, "class": "economy", "return_time_num": 4, "return_month": "June", "return_day": "14", "num_connections": 0, "price": 200}, {"return_airport": "DFW", "airline": "AA", "departure_day": "12", "departure_airport": "DTW", "flight_number": 1017, "departure_month": "June", "departure_time_num": 14, "class": "economy", "return_time_num": 23, "return_month": "June", "return_day": "14", "num_connections": 2, "price": 400}, {"return_airport": "DTW", "airline": "JetBlue", "departure_day": "12", "departure_airport": "DFW", "flight_number": 1018, "departure_month": "June", "departure_time_num": 3, "class": "economy", "return_time_num": 1, "return_month": "June", "return_day": "14", "num_connections": 1, "price": 100}, {"return_airport": "DFW", "airline": "Hawaiian", "departure_day": "12", "departure_airport": "IAD", "flight_number": 1019, "departure_month": "June", "departure_time_num": 7, "class": "economy", "return_time_num": 18, "return_month": "June", "return_day": "14", "num_connections": 1, "price": 200}, {"return_airport": "DFW", "airline": "Delta", "departure_day": "12", "departure_airport": "IAD", "flight_number": 1020, "departure_month": "June", "departure_time_num": 6, "class": "economy", "return_time_num": 18, "return_month": "June", "return_day": "14", "num_connections": 2, "price": 200}, {"return_airport": "IAD", "airline": "Delta", "departure_day": "12", "departure_airport": "DFW", "flight_number": 1021, "departure_month": "June", "departure_time_num": 11, "class": "business", "return_time_num": 8, "return_month": "June", "return_day": "14", "num_connections": 0, "price": 1000}, {"return_airport": "IAD", "airline": "JetBlue", "departure_day": "12", "departure_airport": "DTW", "flight_number": 1022, "departure_month": "June", "departure_time_num": 4, "class": "economy", "return_time_num": 14, "return_month": "June", "return_day": "13", "num_connections": 0, "price": 200}, {"return_airport": "IAD", "airline": "Frontier", "departure_day": "12", "departure_airport": "DTW", "flight_number": 1023, "departure_month": "June", "departure_time_num": 19, "class": "economy", "return_time_num": 23, "return_month": "June", "return_day": "13", "num_connections": 1, "price": 200}, {"return_airport": "DFW", "airline": "UA", "departure_day": "12", "departure_airport": "DTW", "flight_number": 1024, "departure_month": "June", "departure_time_num": 11, "class": "economy", "return_time_num": 19, "return_month": "June", "return_day": "15", "num_connections": 1, "price": 200}, {"return_airport": "DTW", "airline": "Hawaiian", "departure_day": "11", "departure_airport": "IAD", "flight_number": 1025, "departure_month": "June", "departure_time_num": 6, "class": "economy", "return_time_num": 10, "return_month": "June", "return_day": "14", "num_connections": 1, "price": 100}, {"return_airport": "DTW", "airline": "UA", "departure_day": "12", "departure_airport": "DFW", "flight_number": 1026, "departure_month": "June", "departure_time_num": 0, "class": "economy", "return_time_num": 18, "return_month": "June", "return_day": "14", "num_connections": 1, "price": 300}, {"return_airport": "IAD", "airline": "Delta", "departure_day": "12", "departure_airport": "DFW", "flight_number": 1027, "departure_month": "June", "departure_time_num": 17, "class": "economy", "return_time_num": 15, "return_month": "June", "return_day": "14", "num_connections": 1, "price": 200}, {"return_airport": "IAD", "airline": "Southwest", "departure_day": "12", "departure_airport": "DTW", "flight_number": 1028, "departure_month": "June", "departure_time_num": 23, "class": "economy", "return_time_num": 13, "return_month": "June", "return_day": "14", "num_connections": 1, "price": 100}, {"return_airport": "DFW", "airline": "Spirit", "departure_day": "11", "departure_airport": "DTW", "flight_number": 1029, "departure_month": "June", "departure_time_num": 22, "class": "business", "return_time_num": 4, "return_month": "June", "return_day": "14", "num_connections": 0, "price": 800}], "reservation": 0}
93
+ ```
94
+
95
+ ### Data Fields
96
+
97
+ BuilderConfig: `air_dialogue_data`:
98
+ Provides for customer context, dialogue states and environment
99
+
100
+ key name | Description |
101
+ |---|---|
102
+ |'search_action' | search action performed by customer |
103
+ |'action' | Action taken by the agent |
104
+ |'intent' | Intents from the conversation |
105
+ |'timestamps' | Timestamp for each of the dialogues |
106
+ |'dialogue' | Dialogue recorded between agent & customer |
107
+ |'expected_action' | Expected action from agent (human-annotated)|
108
+ |'correct_sample' | whether action performed by agent was same as expected_action |
109
+
110
+ BuilderConfig: `air_dialogue_kb`:
111
+ Provides for the Agent Context _ca_ = (_db_, _r_ )
112
+
113
+ key name | Description |
114
+ |---|---|
115
+ |'kb' | Available flights in the database |
116
+ |'reservation' | whether customer has an existing reservation|
117
+
118
+
119
+ ### Data Splits
120
+
121
+ Data is split into Train/Dev & Test in the ration of 80%, 10% and 10%
122
+
123
+ ## Dataset Creation
124
+
125
+ ### Curation Rationale
126
+
127
+ [Needs More Information]
128
+
129
+ ### Source Data
130
+
131
+ #### Initial Data Collection and Normalization
132
+
133
+ [Needs More Information]
134
+
135
+ #### Who are the source language producers?
136
+
137
+ [Needs More Information]
138
+
139
+ ### Annotations
140
+
141
+ #### Annotation process
142
+
143
+ To collect this dataset, we create a contextgenerator which provides travel and flight restrictions. We then ask human annotators to play the role of a customer or an agent and interact with the goal of successfully booking a trip given the restrictions. Key to our environment is the ease of evaluating the success of the dialogue, which is achieved by using ground-truth states (e.g., the flight being booked) generated by the restrictions. Any dialogue agent that does not generate the correct states is considered to fail.
144
+
145
+ #### Who are the annotators?
146
+
147
+ [Needs More Information]
148
+
149
+ ### Personal and Sensitive Information
150
+
151
+ No personal and sensitive information is stored
152
+
153
+ ## Considerations for Using the Data
154
+
155
+ ### Social Impact of Dataset
156
+
157
+ [Needs More Information]
158
+
159
+ ### Discussion of Biases
160
+
161
+ [Needs More Information]
162
+
163
+ ### Other Known Limitations
164
+
165
+ [Needs More Information]
166
+
167
+ ## Additional Information
168
+
169
+ ### Dataset Curators
170
+
171
+ [AirDialogue team](mailto:airdialogue@gmail.com)
172
+
173
+ For issues regarding HuggingFace Dataset Hub implementation [Aakash Gupta](mailto:aakashg80@gmail.com)
174
+
175
+ ### Licensing Information
176
+
177
+ cc-by-nc-4.0
178
+
179
+ ### Citation Information
180
+
181
+ @inproceedings{wei-etal-2018-airdialogue,
182
+ title = "{A}ir{D}ialogue: An Environment for Goal-Oriented Dialogue Research",
183
+ author = "Wei, Wei and
184
+ Le, Quoc and
185
+ Dai, Andrew and
186
+ Li, Jia",
187
+ booktitle = "Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing",
188
+ month = oct # "-" # nov,
189
+ year = "2018",
190
+ address = "Brussels, Belgium",
191
+ publisher = "Association for Computational Linguistics",
192
+ url = "https://www.aclweb.org/anthology/D18-1419",
193
+ doi = "10.18653/v1/D18-1419",
194
+ pages = "3844--3854",
195
+ abstract = "Recent progress in dialogue generation has inspired a number of studies on dialogue systems that are capable of accomplishing tasks through natural language interactions. A promising direction among these studies is the use of reinforcement learning techniques, such as self-play, for training dialogue agents. However, current datasets are limited in size, and the environment for training agents and evaluating progress is relatively unsophisticated. We present AirDialogue, a large dataset that contains 301,427 goal-oriented conversations. To collect this dataset, we create a context-generator which provides travel and flight restrictions. We then ask human annotators to play the role of a customer or an agent and interact with the goal of successfully booking a trip given the restrictions. Key to our environment is the ease of evaluating the success of the dialogue, which is achieved by using ground-truth states (e.g., the flight being booked) generated by the restrictions. Any dialogue agent that does not generate the correct states is considered to fail. Our experimental results indicate that state-of-the-art dialogue models can only achieve a score of 0.17 while humans can reach a score of 0.91, which suggests significant opportunities for future improvement.",
196
+ }
air_dialogue.py ADDED
@@ -0,0 +1,288 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """AirDialogue: A large dataset for goal oriented conversations."""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import json
20
+ import os
21
+
22
+ import datasets
23
+
24
+
25
+ # TODO: Add BibTeX citation
26
+ # Find for instance the citation on arxiv or on the dataset repo/website
27
+ _CITATION = """\
28
+ @inproceedings{wei-etal-2018-airdialogue,
29
+ title = "{A}ir{D}ialogue: An Environment for Goal-Oriented Dialogue Research",
30
+ author = "Wei, Wei and
31
+ Le, Quoc and
32
+ Dai, Andrew and
33
+ Li, Jia",
34
+ booktitle = "Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing",
35
+ month = oct # "-" # nov,
36
+ year = "2018",
37
+ address = "Brussels, Belgium",
38
+ publisher = "Association for Computational Linguistics",
39
+ url = "https://www.aclweb.org/anthology/D18-1419",
40
+ doi = "10.18653/v1/D18-1419",
41
+ pages = "3844--3854",
42
+ abstract = "Recent progress in dialogue generation has inspired a number of studies on dialogue systems that are capable of accomplishing tasks through natural language interactions. A promising direction among these studies is the use of reinforcement learning techniques, such as self-play, for training dialogue agents. However, current datasets are limited in size, and the environment for training agents and evaluating progress is relatively unsophisticated. We present AirDialogue, a large dataset that contains 301,427 goal-oriented conversations. To collect this dataset, we create a context-generator which provides travel and flight restrictions. We then ask human annotators to play the role of a customer or an agent and interact with the goal of successfully booking a trip given the restrictions. Key to our environment is the ease of evaluating the success of the dialogue, which is achieved by using ground-truth states (e.g., the flight being booked) generated by the restrictions. Any dialogue agent that does not generate the correct states is considered to fail. Our experimental results indicate that state-of-the-art dialogue models can only achieve a score of 0.17 while humans can reach a score of 0.91, which suggests significant opportunities for future improvement.",
43
+ }
44
+ """
45
+
46
+ # TODO: Add description of the dataset here
47
+ # You can copy an official description
48
+ _DESCRIPTION = """\
49
+ AirDialogue, is a large dataset that contains 402,038 goal-oriented conversations. To collect this dataset, we create a contextgenerator which provides travel and flight restrictions. Then the human annotators are asked to play the role of a customer or an agent and interact with the goal of successfully booking a trip given the restrictions.
50
+ """
51
+
52
+ # TODO: Add a link to an official homepage for the dataset here
53
+ _HOMEPAGE = "https://worksheets.codalab.org/worksheets/0xa79833f4b3c24f4188cee7131b120a59"
54
+
55
+ # TODO: Add the licence for the dataset here if you can find it
56
+ _LICENSE = "cc-by-nc-4.0"
57
+
58
+ # TODO: Add link to the official dataset URLs here
59
+ # The HuggingFace dataset library don't host the datasets but only point to the original files
60
+ # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
61
+ _URLs = {
62
+ "air_dialogue_data": "https://storage.googleapis.com/airdialogue/airdialogue_data.tar.gz",
63
+ "air_dialogue_kb": "https://storage.googleapis.com/airdialogue/airdialogue_data.tar.gz",
64
+ }
65
+
66
+
67
+ # TODO: Name of the dataset usually match the script name with CamelCase instead of snake_case
68
+ class AirDialogue(datasets.GeneratorBasedBuilder):
69
+ """TODO: Short description of my dataset."""
70
+
71
+ VERSION = datasets.Version("1.1.0")
72
+
73
+ # This is an example of a dataset with multiple configurations.
74
+ # If you don't want/need to define several sub-sets in your dataset,
75
+ # just remove the BUILDER_CONFIG_CLASS and the BUILDER_CONFIGS attributes.
76
+
77
+ # If you need to make complex sub-parts in the datasets with configurable options
78
+ # You can create your own builder configuration class to store attribute, inheriting from datasets.BuilderConfig
79
+ # BUILDER_CONFIG_CLASS = MyBuilderConfig
80
+
81
+ # You will be able to load one or the other configurations in the following list with
82
+ # data = datasets.load_dataset('my_dataset', 'first_domain')
83
+ # data = datasets.load_dataset('my_dataset', 'second_domain')
84
+ BUILDER_CONFIGS = [
85
+ datasets.BuilderConfig(
86
+ name="air_dialogue_data", version=VERSION, description="This part of my dataset covers the dialog files"
87
+ ),
88
+ datasets.BuilderConfig(
89
+ name="air_dialogue_kb", version=VERSION, description="This part of my dataset covers the knowledge base"
90
+ ),
91
+ ]
92
+
93
+ DEFAULT_CONFIG_NAME = (
94
+ "air_dialogue_data" # It's not mandatory to have a default configuration. Just use one if it make sense.
95
+ )
96
+
97
+ def _info(self):
98
+ # TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
99
+ if (
100
+ self.config.name == "air_dialogue_data"
101
+ ): # This is the name of the configuration selected in BUILDER_CONFIGS above
102
+ features = datasets.Features(
103
+ {
104
+ "action": {
105
+ "status": datasets.Value("string"),
106
+ "name": datasets.Value("string"),
107
+ "flight": datasets.features.Sequence(datasets.Value("int32")),
108
+ },
109
+ "intent": {
110
+ "return_month": datasets.Value("string"),
111
+ "return_day": datasets.Value("string"),
112
+ "max_price": datasets.Value("int32"),
113
+ "departure_airport": datasets.Value("string"),
114
+ "max_connections": datasets.Value("int32"),
115
+ "departure_day": datasets.Value("string"),
116
+ "goal": datasets.Value("string"),
117
+ "departure_month": datasets.Value("string"),
118
+ "name": datasets.Value("string"),
119
+ "return_airport": datasets.Value("string"),
120
+ },
121
+ "timestamps": datasets.features.Sequence(datasets.Value("int64")),
122
+ "dialogue": datasets.features.Sequence(datasets.Value("string")),
123
+ "expected_action": {
124
+ "status": datasets.Value("string"),
125
+ "name": datasets.Value("string"),
126
+ "flight": datasets.features.Sequence(datasets.Value("int32")),
127
+ },
128
+ "search_info": [
129
+ {
130
+ "button_name": datasets.Value("string"),
131
+ "field_name": datasets.Value("string"),
132
+ "field_value": datasets.Value("string"),
133
+ "timestmamp": datasets.Value("int64"),
134
+ },
135
+ ],
136
+ "correct_sample": datasets.Value("bool_"),
137
+ }
138
+ )
139
+ else:
140
+ features = datasets.Features(
141
+ {
142
+ "kb": [
143
+ {
144
+ "airline": datasets.Value("string"),
145
+ "class": datasets.Value("string"),
146
+ "departure_airport": datasets.Value("string"),
147
+ "departure_day": datasets.Value("string"),
148
+ "departure_month": datasets.Value("string"),
149
+ "departure_time_num": datasets.Value("int32"),
150
+ "flight_number": datasets.Value("int32"),
151
+ "num_connections": datasets.Value("int32"),
152
+ "price": datasets.Value("int32"),
153
+ "return_airport": datasets.Value("string"),
154
+ "return_day": datasets.Value("string"),
155
+ "return_month": datasets.Value("string"),
156
+ "return_time_num": datasets.Value("int32"),
157
+ },
158
+ ],
159
+ "reservation": datasets.Value("int32"),
160
+ }
161
+ )
162
+
163
+ return datasets.DatasetInfo(
164
+ # This is the description that will appear on the datasets page.
165
+ description=_DESCRIPTION,
166
+ # This defines the different columns of the dataset and their types
167
+ features=features, # Here we define them above because they are different between the two configurations
168
+ # If there's a common (input, target) tuple from the features,
169
+ # specify them here. They'll be used if as_supervised=True in
170
+ # builder.as_dataset.
171
+ supervised_keys=None,
172
+ # Homepage of the dataset for documentation
173
+ homepage=_HOMEPAGE,
174
+ # License for the dataset if available
175
+ license=_LICENSE,
176
+ # Citation for the dataset
177
+ citation=_CITATION,
178
+ )
179
+
180
+ def _split_generators(self, dl_manager):
181
+ """Returns SplitGenerators."""
182
+ # TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration
183
+ # If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name
184
+
185
+ # dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLs
186
+ # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
187
+ # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
188
+ my_urls = _URLs[self.config.name]
189
+ data_dir = dl_manager.download_and_extract(my_urls)
190
+ if self.config.name == "air_dialogue_data":
191
+ train = "airdialogue_data/airdialogue/train_data.json"
192
+ dev = "airdialogue_data/airdialogue/dev_data.json"
193
+ else:
194
+ train = "airdialogue_data/airdialogue/train_kb.json"
195
+ dev = "airdialogue_data/airdialogue/dev_kb.json"
196
+
197
+ return [
198
+ datasets.SplitGenerator(
199
+ name=datasets.Split.TRAIN,
200
+ # These kwargs will be passed to _generate_examples
201
+ gen_kwargs={
202
+ "filepath": os.path.join(data_dir, train),
203
+ "split": "train",
204
+ },
205
+ ),
206
+ datasets.SplitGenerator(
207
+ name=datasets.Split.VALIDATION,
208
+ # These kwargs will be passed to _generate_examples
209
+ gen_kwargs={
210
+ "filepath": os.path.join(data_dir, dev),
211
+ "split": "dev",
212
+ },
213
+ ),
214
+ ]
215
+
216
+ def _generate_examples(self, filepath, split):
217
+ """ Yields examples. """
218
+ # TODO: This method will receive as arguments the `gen_kwargs` defined in the previous `_split_generators` method.
219
+ # It is in charge of opening the given file and yielding (key, example) tuples from the dataset
220
+ # The key is not important, it's more here for legacy reason (legacy from tfds)
221
+
222
+ with open(filepath, encoding="utf-8") as f:
223
+ for id_, row in enumerate(f):
224
+ data = json.loads(row)
225
+ if self.config.name == "air_dialogue_data":
226
+
227
+ intent = {
228
+ "return_month": data["intent"]["return_month"],
229
+ "return_day": data["intent"]["return_day"],
230
+ "max_price": data["intent"]["max_price"],
231
+ "departure_airport": data["intent"]["departure_airport"],
232
+ "max_connections": data["intent"].get("max_connections", -1),
233
+ "departure_day": data["intent"]["departure_day"],
234
+ "goal": data["intent"]["goal"],
235
+ "departure_month": data["intent"]["departure_month"],
236
+ "name": data["intent"]["name"],
237
+ "return_airport": data["intent"]["return_airport"],
238
+ }
239
+
240
+ search_info = (
241
+ []
242
+ if "search_info" not in data
243
+ else [
244
+ {
245
+ "button_name": search_info.get("button_name", ""),
246
+ "field_name": search_info.get("field_name", ""),
247
+ "field_value": search_info.get("field_value", ""),
248
+ "timestmamp": search_info["timestmamp"],
249
+ }
250
+ for search_info in data["search_info"]
251
+ ]
252
+ )
253
+
254
+ yield id_, {
255
+ "action": {key: data["action"][key] for key in data["action"]},
256
+ "intent": intent,
257
+ "timestamps": data["timestamps"],
258
+ "dialogue": data["dialogue"],
259
+ "expected_action": {key: data["expected_action"][key] for key in data["expected_action"]},
260
+ "search_info": search_info,
261
+ "correct_sample": data["correct_sample"],
262
+ }
263
+
264
+ else:
265
+
266
+ kb = [
267
+ {
268
+ "airline": kb["airline"],
269
+ "class": kb["class"],
270
+ "departure_airport": kb["departure_airport"],
271
+ "departure_day": kb["departure_day"],
272
+ "departure_month": kb["departure_month"],
273
+ "departure_time_num": kb["departure_time_num"],
274
+ "flight_number": kb["flight_number"],
275
+ "num_connections": kb["num_connections"],
276
+ "price": kb["price"],
277
+ "return_airport": kb["return_airport"],
278
+ "return_day": kb["return_day"],
279
+ "return_month": kb["return_month"],
280
+ "return_time_num": kb["return_time_num"],
281
+ }
282
+ for kb in data["kb"]
283
+ ]
284
+
285
+ yield id_, {
286
+ "kb": kb,
287
+ "reservation": data["reservation"],
288
+ }
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"air_dialogue_data": {"description": "AirDialogue, is a large dataset that contains 402,038 goal-oriented conversations. To collect this dataset, we create a contextgenerator which provides travel and flight restrictions. Then the human annotators are asked to play the role of a customer or an agent and interact with the goal of successfully booking a trip given the restrictions.\n", "citation": "@inproceedings{wei-etal-2018-airdialogue,\n title = \"{A}ir{D}ialogue: An Environment for Goal-Oriented Dialogue Research\",\n author = \"Wei, Wei and\n Le, Quoc and\n Dai, Andrew and\n Li, Jia\",\n booktitle = \"Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing\",\n month = oct # \"-\" # nov,\n year = \"2018\",\n address = \"Brussels, Belgium\",\n publisher = \"Association for Computational Linguistics\",\n url = \"https://www.aclweb.org/anthology/D18-1419\",\n doi = \"10.18653/v1/D18-1419\",\n pages = \"3844--3854\",\n abstract = \"Recent progress in dialogue generation has inspired a number of studies on dialogue systems that are capable of accomplishing tasks through natural language interactions. A promising direction among these studies is the use of reinforcement learning techniques, such as self-play, for training dialogue agents. However, current datasets are limited in size, and the environment for training agents and evaluating progress is relatively unsophisticated. We present AirDialogue, a large dataset that contains 301,427 goal-oriented conversations. To collect this dataset, we create a context-generator which provides travel and flight restrictions. We then ask human annotators to play the role of a customer or an agent and interact with the goal of successfully booking a trip given the restrictions. Key to our environment is the ease of evaluating the success of the dialogue, which is achieved by using ground-truth states (e.g., the flight being booked) generated by the restrictions. Any dialogue agent that does not generate the correct states is considered to fail. Our experimental results indicate that state-of-the-art dialogue models can only achieve a score of 0.17 while humans can reach a score of 0.91, which suggests significant opportunities for future improvement.\",\n}\n", "homepage": "https://worksheets.codalab.org/worksheets/0xa79833f4b3c24f4188cee7131b120a59", "license": "cc-by-nc-4.0", "features": {"action": {"status": {"dtype": "string", "id": null, "_type": "Value"}, "name": {"dtype": "string", "id": null, "_type": "Value"}, "flight": {"feature": {"dtype": "int32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "intent": {"return_month": {"dtype": "string", "id": null, "_type": "Value"}, "return_day": {"dtype": "string", "id": null, "_type": "Value"}, "max_price": {"dtype": "int32", "id": null, "_type": "Value"}, "departure_airport": {"dtype": "string", "id": null, "_type": "Value"}, "max_connections": {"dtype": "int32", "id": null, "_type": "Value"}, "departure_day": {"dtype": "string", "id": null, "_type": "Value"}, "goal": {"dtype": "string", "id": null, "_type": "Value"}, "departure_month": {"dtype": "string", "id": null, "_type": "Value"}, "name": {"dtype": "string", "id": null, "_type": "Value"}, "return_airport": {"dtype": "string", "id": null, "_type": "Value"}}, "timestamps": {"feature": {"dtype": "int64", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "dialogue": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "expected_action": {"status": {"dtype": "string", "id": null, "_type": "Value"}, "name": {"dtype": "string", "id": null, "_type": "Value"}, "flight": {"feature": {"dtype": "int32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "search_info": [{"button_name": {"dtype": "string", "id": null, "_type": "Value"}, "field_name": {"dtype": "string", "id": null, "_type": "Value"}, "field_value": {"dtype": "string", "id": null, "_type": "Value"}, "timestmamp": {"dtype": "int64", "id": null, "_type": "Value"}}], "correct_sample": {"dtype": "bool_", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "air_dialogue", "config_name": "air_dialogue_data", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 353721137, "num_examples": 321459, "dataset_name": "air_dialogue"}, "validation": {"name": "validation", "num_bytes": 44442238, "num_examples": 40363, "dataset_name": "air_dialogue"}}, "download_checksums": {"https://storage.googleapis.com/airdialogue/airdialogue_data.tar.gz": {"num_bytes": 272898923, "checksum": "7d2130cdde73a59afd6ad6c463a25453d8ed677c1b3a4a4aaa2406db9c9712cb"}}, "download_size": 272898923, "post_processing_size": null, "dataset_size": 398163375, "size_in_bytes": 671062298}, "air_dialogue_kb": {"description": "AirDialogue, is a large dataset that contains 402,038 goal-oriented conversations. To collect this dataset, we create a contextgenerator which provides travel and flight restrictions. Then the human annotators are asked to play the role of a customer or an agent and interact with the goal of successfully booking a trip given the restrictions.\n", "citation": "@inproceedings{wei-etal-2018-airdialogue,\n title = \"{A}ir{D}ialogue: An Environment for Goal-Oriented Dialogue Research\",\n author = \"Wei, Wei and\n Le, Quoc and\n Dai, Andrew and\n Li, Jia\",\n booktitle = \"Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing\",\n month = oct # \"-\" # nov,\n year = \"2018\",\n address = \"Brussels, Belgium\",\n publisher = \"Association for Computational Linguistics\",\n url = \"https://www.aclweb.org/anthology/D18-1419\",\n doi = \"10.18653/v1/D18-1419\",\n pages = \"3844--3854\",\n abstract = \"Recent progress in dialogue generation has inspired a number of studies on dialogue systems that are capable of accomplishing tasks through natural language interactions. A promising direction among these studies is the use of reinforcement learning techniques, such as self-play, for training dialogue agents. However, current datasets are limited in size, and the environment for training agents and evaluating progress is relatively unsophisticated. We present AirDialogue, a large dataset that contains 301,427 goal-oriented conversations. To collect this dataset, we create a context-generator which provides travel and flight restrictions. We then ask human annotators to play the role of a customer or an agent and interact with the goal of successfully booking a trip given the restrictions. Key to our environment is the ease of evaluating the success of the dialogue, which is achieved by using ground-truth states (e.g., the flight being booked) generated by the restrictions. Any dialogue agent that does not generate the correct states is considered to fail. Our experimental results indicate that state-of-the-art dialogue models can only achieve a score of 0.17 while humans can reach a score of 0.91, which suggests significant opportunities for future improvement.\",\n}\n", "homepage": "https://worksheets.codalab.org/worksheets/0xa79833f4b3c24f4188cee7131b120a59", "license": "cc-by-nc-4.0", "features": {"kb": [{"airline": {"dtype": "string", "id": null, "_type": "Value"}, "class": {"dtype": "string", "id": null, "_type": "Value"}, "departure_airport": {"dtype": "string", "id": null, "_type": "Value"}, "departure_day": {"dtype": "string", "id": null, "_type": "Value"}, "departure_month": {"dtype": "string", "id": null, "_type": "Value"}, "departure_time_num": {"dtype": "int32", "id": null, "_type": "Value"}, "flight_number": {"dtype": "int32", "id": null, "_type": "Value"}, "num_connections": {"dtype": "int32", "id": null, "_type": "Value"}, "price": {"dtype": "int32", "id": null, "_type": "Value"}, "return_airport": {"dtype": "string", "id": null, "_type": "Value"}, "return_day": {"dtype": "string", "id": null, "_type": "Value"}, "return_month": {"dtype": "string", "id": null, "_type": "Value"}, "return_time_num": {"dtype": "int32", "id": null, "_type": "Value"}}], "reservation": {"dtype": "int32", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "air_dialogue", "config_name": "air_dialogue_kb", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 782592158, "num_examples": 321459, "dataset_name": "air_dialogue"}, "validation": {"name": "validation", "num_bytes": 98269789, "num_examples": 40363, "dataset_name": "air_dialogue"}}, "download_checksums": {"https://storage.googleapis.com/airdialogue/airdialogue_data.tar.gz": {"num_bytes": 272898923, "checksum": "7d2130cdde73a59afd6ad6c463a25453d8ed677c1b3a4a4aaa2406db9c9712cb"}}, "download_size": 272898923, "post_processing_size": null, "dataset_size": 880861947, "size_in_bytes": 1153760870}}
dummy/air_dialogue_data/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ca47937efdcaa45f1ac33c1ba072e566eb84803e06e61995747ee99414b5344
3
+ size 11287
dummy/air_dialogue_kb/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ca47937efdcaa45f1ac33c1ba072e566eb84803e06e61995747ee99414b5344
3
+ size 11287