system HF staff commited on
Commit
5bdb646
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,276 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - machine-generated
4
+ language_creators:
5
+ - crowdsourced
6
+ - machine-generated
7
+ languages:
8
+ - en
9
+ licenses:
10
+ - apache-2-0
11
+ multilinguality:
12
+ - monolingual
13
+ size_categories:
14
+ - 10K<n<100K
15
+ source_datasets:
16
+ - original
17
+ task_categories:
18
+ - sequence-modeling
19
+ - structure-prediction
20
+ - text-classification
21
+ task_ids:
22
+ - dialogue-modeling
23
+ - multi-class-classification
24
+ - parsing
25
+ ---
26
+
27
+ # Dataset Card for MultiWOZ
28
+
29
+ ## Table of Contents
30
+ - [Dataset Description](#dataset-description)
31
+ - [Dataset Summary](#dataset-summary)
32
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
33
+ - [Languages](#languages)
34
+ - [Dataset Structure](#dataset-structure)
35
+ - [Data Instances](#data-instances)
36
+ - [Data Fields](#data-instances)
37
+ - [Data Splits](#data-instances)
38
+ - [Dataset Creation](#dataset-creation)
39
+ - [Curation Rationale](#curation-rationale)
40
+ - [Source Data](#source-data)
41
+ - [Annotations](#annotations)
42
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
43
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
44
+ - [Social Impact of Dataset](#social-impact-of-dataset)
45
+ - [Discussion of Biases](#discussion-of-biases)
46
+ - [Other Known Limitations](#other-known-limitations)
47
+ - [Additional Information](#additional-information)
48
+ - [Dataset Curators](#dataset-curators)
49
+ - [Licensing Information](#licensing-information)
50
+ - [Citation Information](#citation-information)
51
+
52
+ ## Dataset Description
53
+
54
+ - **Repository:** [MultiWOZ 2.2 github repository](https://github.com/budzianowski/multiwoz/tree/master/data/MultiWOZ_2.2)
55
+ - **Paper:** [MultiWOZ v2](https://arxiv.org/abs/1810.00278), and [MultiWOZ v2.2](https://www.aclweb.org/anthology/2020.nlp4convai-1.13.pdf)
56
+ - **Point of Contact:** [Paweł Budzianowski](pfb30@cam.ac.uk)
57
+
58
+ ### Dataset Summary
59
+
60
+ Multi-Domain Wizard-of-Oz dataset (MultiWOZ), a fully-labeled collection of human-human written conversations spanning over multiple domains and topics.
61
+ MultiWOZ 2.1 (Eric et al., 2019) identified and fixed many erroneous annotations and user utterances in the original version, resulting in an
62
+ improved version of the dataset. MultiWOZ 2.2 is a yet another improved version of this dataset, which identifies and fixes dialogue state annotation errors
63
+ across 17.3% of the utterances on top of MultiWOZ 2.1 and redefines the ontology by disallowing vocabularies of slots with a large number of possible values
64
+ (e.g., restaurant name, time of booking) and introducing standardized slot span annotations for these slots.
65
+
66
+ ### Supported Tasks and Leaderboards
67
+
68
+ This dataset supports a range of task.
69
+ - **Generative dialogue modeling** or `dialogue-modeling`: the text of the dialogues can be used to train a sequence model on the utterances. Performance on this task is typically evaluated with delexicalized-[BLEU](https://huggingface.co/metrics/bleu), inform rate and request success.
70
+ - **Intent state tracking**, a `multi-class-classification` task: predict the belief state of the user side of the conversation, performance is measured by [F1](https://huggingface.co/metrics/f1).
71
+ - **Dialog act prediction**, a `parsing` task: parse an utterance into the corresponding dialog acts for the system to use. [F1](https://huggingface.co/metrics/f1) is typically reported.
72
+
73
+ ### Languages
74
+
75
+ The text in the dataset is in English (`en`).
76
+
77
+ ## Dataset Structure
78
+
79
+ ### Data Instances
80
+
81
+ A data instance is a full multi-turn dialogue between a `USER` and a `SYSTEM`. Each turn has a single utterance, e.g.:
82
+ ```
83
+ ['What fun places can I visit in the East?',
84
+ 'We have five spots which include boating, museums and entertainment. Any preferences that you have?']
85
+ ```
86
+ The utterances of the `USER` are also annotated with frames denoting their intent and believe state:
87
+ ```
88
+ [{'service': ['attraction'],
89
+ 'slots': [{'copy_from': [],
90
+ 'copy_from_value': [],
91
+ 'exclusive_end': [],
92
+ 'slot': [],
93
+ 'start': [],
94
+ 'value': []}],
95
+ 'state': [{'active_intent': 'find_attraction',
96
+ 'requested_slots': [],
97
+ 'slots_values': {'slots_values_list': [['east']],
98
+ 'slots_values_name': ['attraction-area']}}]},
99
+ {'service': [], 'slots': [], 'state': []}]
100
+ ```
101
+ Finally, each of the utterances is annotated with dialog acts which provide a structured representation of what the `USER` or `SYSTEM` is inquiring or giving information about.
102
+ ```
103
+ [{'dialog_act': {'act_slots': [{'slot_name': ['east'],
104
+ 'slot_value': ['area']}],
105
+ 'act_type': ['Attraction-Inform']},
106
+ 'span_info': {'act_slot_name': ['area'],
107
+ 'act_slot_value': ['east'],
108
+ 'act_type': ['Attraction-Inform'],
109
+ 'span_end': [39],
110
+ 'span_start': [35]}},
111
+ {'dialog_act': {'act_slots': [{'slot_name': ['none'], 'slot_value': ['none']},
112
+ {'slot_name': ['boating', 'museums', 'entertainment', 'five'],
113
+ 'slot_value': ['type', 'type', 'type', 'choice']}],
114
+ 'act_type': ['Attraction-Select', 'Attraction-Inform']},
115
+ 'span_info': {'act_slot_name': ['type', 'type', 'type', 'choice'],
116
+ 'act_slot_value': ['boating', 'museums', 'entertainment', 'five'],
117
+ 'act_type': ['Attraction-Inform',
118
+ 'Attraction-Inform',
119
+ 'Attraction-Inform',
120
+ 'Attraction-Inform'],
121
+ 'span_end': [40, 49, 67, 12],
122
+ 'span_start': [33, 42, 54, 8]}}]
123
+ ```
124
+
125
+ ### Data Fields
126
+
127
+ Each dialogue instance has the following fields:
128
+ - `dialogue_id`: a unique ID identifying the dialog. The MUL and PMUL names refer to strictly multi domain dialogues (at least 2 main domains are involved) while the SNG, SSNG and WOZ names refer to single domain dialogues with potentially sub-domains like booking.
129
+ - `services`: a list of services mentioned in the dialog, such as `train` or `hospitals`.
130
+ - `turns`: the sequence of utterances with their annotations, including:
131
+ - `turn_id`: a turn identifier, unique per dialog.
132
+ - `speaker`: either the `USER` or `SYSTEM`.
133
+ - `utterance`: the text of the utterance.
134
+ - `dialogue_acts`: The structured parse of the utterance into dialog acts in the system's grammar
135
+ - `act_type`: Such as e.g. `Attraction-Inform` to seek or provide information about an `attraction`
136
+ - `act_slots`: provide more details about the action
137
+ - `span_info`: maps these `act_slots` to the `utterance` text.
138
+ - `frames`: only for `USER` utterances, track the user's belief state, i.e. a structured representation of what they are trying to achieve in the fialog. This decomposes into:
139
+ - `service`: the service they are interested in
140
+ - `state`: their belief state including their `active_intent` and further information expressed in `requested_slots`
141
+ - `slots`: a mapping of the `requested_slots` to where they are mentioned in the text. It takes one of two forms, detailed next:
142
+ The first type are span annotations that identify the location where slot values have been mentioned in the utterances for non-categorical slots. These span annotations are represented as follows:
143
+ ```
144
+ {
145
+ "slots": [
146
+ {
147
+ "slot": String of slot name.
148
+ "start": Int denoting the index of the starting character in the utterance corresponding to the slot value.
149
+ "exclusive_end": Int denoting the index of the character just after the last character corresponding to the slot value in the utterance. In python, utterance[start:exclusive_end] gives the slot value.
150
+ "value": String of value. It equals to utterance[start:exclusive_end], where utterance is the current utterance in string.
151
+ }
152
+ ]
153
+ }
154
+ ```
155
+ There are also some non-categorical slots whose values are carried over from another slot in the dialogue state. Their values don"t explicitly appear in the utterances. For example, a user utterance can be "I also need a taxi from the restaurant to the hotel.", in which the state values of "taxi-departure" and "taxi-destination" are respectively carried over from that of "restaurant-name" and "hotel-name". For these slots, instead of annotating them as spans, a "copy from" annotation identifies the slot it copies the value from. This annotation is formatted as follows,
156
+ ```
157
+ {
158
+ "slots": [
159
+ {
160
+ "slot": Slot name string.
161
+ "copy_from": The slot to copy from.
162
+ "value": A list of slot values being . It corresponds to the state values of the "copy_from" slot.
163
+ }
164
+ ]
165
+ }
166
+ ```
167
+
168
+ ### Data Splits
169
+
170
+ The dataset is split into a `train`, `validation`, and `test` split with the following sizes:
171
+
172
+ | | Tain | Valid | Test |
173
+ | ----- | ------ | ----- | ---- |
174
+ | Number of dialogues | 8438 | 1000 | 1000 |
175
+ | Number of turns | 42190 | 5000 | 5000 |
176
+
177
+ ## Dataset Creation
178
+
179
+ ### Curation Rationale
180
+
181
+ [More Information Needed]
182
+
183
+ ### Source Data
184
+
185
+ #### Initial Data Collection and Normalization
186
+
187
+ [More Information Needed]
188
+
189
+ #### Who are the source language producers?
190
+
191
+ [More Information Needed]
192
+
193
+ ### Annotations
194
+
195
+ #### Annotation process
196
+
197
+ [More Information Needed]
198
+
199
+ #### Who are the annotators?
200
+
201
+ [More Information Needed]
202
+
203
+ ### Personal and Sensitive Information
204
+
205
+ [More Information Needed]
206
+
207
+ ## Considerations for Using the Data
208
+
209
+ ### Social Impact of Dataset
210
+
211
+ [More Information Needed]
212
+
213
+ ### Discussion of Biases
214
+
215
+ [More Information Needed]
216
+
217
+ ### Other Known Limitations
218
+
219
+ [More Information Needed]
220
+
221
+ ## Additional Information
222
+
223
+ ### Dataset Curators
224
+
225
+ The initial dataset (Versions 1.0 and 2.0) was created by a team of researchers from the [Cambridge Dialogue Systems Group](https://mi.eng.cam.ac.uk/research/dialogue/corpora/). Version 2.1 was developed on top of v2.0 by a team from Amazon, and v2.2 was developed by a team of Google researchers.
226
+
227
+ ### Licensing Information
228
+
229
+ The dataset is released under the Apache License 2.0.
230
+
231
+ ### Citation Information
232
+
233
+ You can cite the following for the various versions of MultiWOZ:
234
+
235
+ Version 1.0
236
+ ```
237
+ @inproceedings{ramadan2018large,
238
+ title={Large-Scale Multi-Domain Belief Tracking with Knowledge Sharing},
239
+ author={Ramadan, Osman and Budzianowski, Pawe{\l} and Gasic, Milica},
240
+ booktitle={Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics},
241
+ volume={2},
242
+ pages={432--437},
243
+ year={2018}
244
+ }
245
+ ```
246
+
247
+ Version 2.0
248
+ ```
249
+ @inproceedings{budzianowski2018large,
250
+ Author = {Budzianowski, Pawe{\l} and Wen, Tsung-Hsien and Tseng, Bo-Hsiang and Casanueva, I{\~n}igo and Ultes Stefan and Ramadan Osman and Ga{\v{s}}i\'c, Milica},
251
+ title={MultiWOZ - A Large-Scale Multi-Domain Wizard-of-Oz Dataset for Task-Oriented Dialogue Modelling},
252
+ booktitle={Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing (EMNLP)},
253
+ year={2018}
254
+ }
255
+ ```
256
+
257
+ Version 2.1
258
+ ```
259
+ @article{eric2019multiwoz,
260
+ title={MultiWOZ 2.1: Multi-Domain Dialogue State Corrections and State Tracking Baselines},
261
+ author={Eric, Mihail and Goel, Rahul and Paul, Shachi and Sethi, Abhishek and Agarwal, Sanchit and Gao, Shuyag and Hakkani-Tur, Dilek},
262
+ journal={arXiv preprint arXiv:1907.01669},
263
+ year={2019}
264
+ }
265
+ ```
266
+
267
+ Version 2.2
268
+ ```
269
+ @inproceedings{zang2020multiwoz,
270
+ title={MultiWOZ 2.2: A Dialogue Dataset with Additional Annotation Corrections and State Tracking Baselines},
271
+ author={Zang, Xiaoxue and Rastogi, Abhinav and Sunkara, Srinivas and Gupta, Raghav and Zhang, Jianguo and Chen, Jindong},
272
+ booktitle={Proceedings of the 2nd Workshop on Natural Language Processing for Conversational AI, ACL 2020},
273
+ pages={109--117},
274
+ year={2020}
275
+ }
276
+ ```
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"v2.2": {"description": "Multi-Domain Wizard-of-Oz dataset (MultiWOZ), a fully-labeled collection of human-human written conversations spanning over multiple domains and topics.\nMultiWOZ 2.1 (Eric et al., 2019) identified and fixed many erroneous annotations and user utterances in the original version, resulting in an\nimproved version of the dataset. MultiWOZ 2.2 is a yet another improved version of this dataset, which identifies and fizes dialogue state annotation errors\nacross 17.3% of the utterances on top of MultiWOZ 2.1 and redefines the ontology by disallowing vocabularies of slots with a large number of possible values\n(e.g., restaurant name, time of booking) and introducing standardized slot span annotations for these slots.\n", "citation": "@article{corr/abs-2007-12720,\n author = {Xiaoxue Zang and\n Abhinav Rastogi and\n Srinivas Sunkara and\n Raghav Gupta and\n Jianguo Zhang and\n Jindong Chen},\n title = {MultiWOZ 2.2 : {A} Dialogue Dataset with Additional Annotation Corrections\n and State Tracking Baselines},\n journal = {CoRR},\n volume = {abs/2007.12720},\n year = {2020},\n url = {https://arxiv.org/abs/2007.12720},\n archivePrefix = {arXiv},\n eprint = {2007.12720}\n}\n", "homepage": "https://github.com/budzianowski/multiwoz/tree/master/data/MultiWOZ_2.2", "license": "Apache License 2.0", "features": {"dialogue_id": {"dtype": "string", "id": null, "_type": "Value"}, "services": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "turns": {"feature": {"turn_id": {"dtype": "string", "id": null, "_type": "Value"}, "speaker": {"num_classes": 2, "names": ["USER", "SYSTEM"], "names_file": null, "id": null, "_type": "ClassLabel"}, "utterance": {"dtype": "string", "id": null, "_type": "Value"}, "frames": {"feature": {"service": {"dtype": "string", "id": null, "_type": "Value"}, "state": {"active_intent": {"dtype": "string", "id": null, "_type": "Value"}, "requested_slots": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "slots_values": {"feature": {"slots_values_name": {"dtype": "string", "id": null, "_type": "Value"}, "slots_values_list": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "length": -1, "id": null, "_type": "Sequence"}}, "slots": {"feature": {"slot": {"dtype": "string", "id": null, "_type": "Value"}, "value": {"dtype": "string", "id": null, "_type": "Value"}, "start": {"dtype": "int32", "id": null, "_type": "Value"}, "exclusive_end": {"dtype": "int32", "id": null, "_type": "Value"}, "copy_from": {"dtype": "string", "id": null, "_type": "Value"}, "copy_from_value": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "length": -1, "id": null, "_type": "Sequence"}}, "length": -1, "id": null, "_type": "Sequence"}, "dialogue_acts": {"dialog_act": {"feature": {"act_type": {"dtype": "string", "id": null, "_type": "Value"}, "act_slots": {"feature": {"slot_name": {"dtype": "string", "id": null, "_type": "Value"}, "slot_value": {"dtype": "string", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}}, "length": -1, "id": null, "_type": "Sequence"}, "span_info": {"feature": {"act_type": {"dtype": "string", "id": null, "_type": "Value"}, "act_slot_name": {"dtype": "string", "id": null, "_type": "Value"}, "act_slot_value": {"dtype": "string", "id": null, "_type": "Value"}, "span_start": {"dtype": "int32", "id": null, "_type": "Value"}, "span_end": {"dtype": "int32", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}}}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "multi_woz_v22", "config_name": "v2.2", "version": {"version_str": "2.2.0", "description": null, "major": 2, "minor": 2, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 67998752, "num_examples": 8438, "dataset_name": "multi_woz_v22"}, "validation": {"name": "validation", "num_bytes": 8961653, "num_examples": 1000, "dataset_name": "multi_woz_v22"}, "test": {"name": "test", "num_bytes": 8996851, "num_examples": 1000, "dataset_name": "multi_woz_v22"}}, "download_checksums": {"https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/dialog_acts.json": {"num_bytes": 60389517, "checksum": "4a3d43544e331ebbfb85d57ed5902e688489ecc217f8f777dfbb93cc9349a5e4"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_001.json": {"num_bytes": 10678915, "checksum": "2d1a5d92bb5ea1a6017f416f76b43e11bdad945b1f93acf870f2f671a98c3032"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_002.json": {"num_bytes": 10779713, "checksum": "2f3ea771d4e01cb2780357738cff7f7496b87d34c221cc240df74501312438d3"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_003.json": {"num_bytes": 9980185, "checksum": "74f73311936c7b4928b073698e5ea61dedad009dc45672963735684e1279521a"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_004.json": {"num_bytes": 10268501, "checksum": "2f9f18b6cb0abbc58c86ca9291aa19baf80395521f9556cf02189c698c48bc52"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_005.json": {"num_bytes": 10519111, "checksum": "eedbe5c649072a3c163e8da109f3c3fd0502425c63db584a11a9cadaa09c91db"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_006.json": {"num_bytes": 10567892, "checksum": "2a51cfed1224110e4cdce80b051d3f7ebecd223d0b3d1c4ade0dd8fc484675fe"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_007.json": {"num_bytes": 10369619, "checksum": "e062becf19b670a45b9333390b6a72f93fc2ed436371ba342499e6532912b1f3"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_008.json": {"num_bytes": 10207590, "checksum": "9cd73cfae130e4d8c76854b6c0f393d68fb084f665a1c7527e04e3b26f877d1b"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_009.json": {"num_bytes": 10169150, "checksum": "fff3f55ee9bd8ecc2492cdb8101e3d5908705e4edd65b3e8cbd7a825be18e47e"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_010.json": {"num_bytes": 10539115, "checksum": "628db438d4f6ab62fb849d3e9df264845b921961052c19b336c8853e2bf4e8d8"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_011.json": {"num_bytes": 10326640, "checksum": "82e2d2900a037b866a01d05974734dd419e89b329fe29ef93b35eea96d27feb8"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_012.json": {"num_bytes": 10585038, "checksum": "5b18461e0f3ff0698818e02a2e105f4f25727d88d02cc4706de19d138e9ceba0"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_013.json": {"num_bytes": 10471561, "checksum": "0f90ba730400be770f753fc46e868189709e6ce06e97d780843ed09db16762b4"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_014.json": {"num_bytes": 10261423, "checksum": "7bd668216f43f6713232c07dcaa1d84e490eeee15caa1b3d843c3075d4b84a10"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_015.json": {"num_bytes": 10423554, "checksum": "5f551d134860595e7834eedab3ebe16e277953cc81b29f46104ef3070cddd4ac"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_016.json": {"num_bytes": 10218789, "checksum": "22eeed01c15a4fba6ac395a6708400672c5c07dbfbd6448bcb451f8697324881"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_017.json": {"num_bytes": 5020437, "checksum": "a1dba37c0fd1dba519500b57be0384219dd4a7bacaec94e124d431932724bd8d"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/dev/dialogues_001.json": {"num_bytes": 11772283, "checksum": "e42bf1839d0ef2b40800b4a82c59924e0d1b6d86dfda84d6405bbe39682a968f"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/dev/dialogues_002.json": {"num_bytes": 10708953, "checksum": "b9fe16f495dfc35b6e7a54a8d229cbadcb28f0551fb9596780763e3aa5edeecb"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/test/dialogues_001.json": {"num_bytes": 11782790, "checksum": "76921f325905886fafcc6c4ff62c238c48ee8e456a3888c5d8296ff5493f6bb3"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/test/dialogues_002.json": {"num_bytes": 10772014, "checksum": "69bd9b0c8a5650d3dcd70eac16148ac6b27c43d7c3c989aa8b53d08241749771"}}, "download_size": 276812790, "post_processing_size": null, "dataset_size": 85957256, "size_in_bytes": 362770046}, "v2.2_active_only": {"description": "Multi-Domain Wizard-of-Oz dataset (MultiWOZ), a fully-labeled collection of human-human written conversations spanning over multiple domains and topics.\nMultiWOZ 2.1 (Eric et al., 2019) identified and fixed many erroneous annotations and user utterances in the original version, resulting in an\nimproved version of the dataset. MultiWOZ 2.2 is a yet another improved version of this dataset, which identifies and fizes dialogue state annotation errors\nacross 17.3% of the utterances on top of MultiWOZ 2.1 and redefines the ontology by disallowing vocabularies of slots with a large number of possible values\n(e.g., restaurant name, time of booking) and introducing standardized slot span annotations for these slots.\n", "citation": "@article{corr/abs-2007-12720,\n author = {Xiaoxue Zang and\n Abhinav Rastogi and\n Srinivas Sunkara and\n Raghav Gupta and\n Jianguo Zhang and\n Jindong Chen},\n title = {MultiWOZ 2.2 : {A} Dialogue Dataset with Additional Annotation Corrections\n and State Tracking Baselines},\n journal = {CoRR},\n volume = {abs/2007.12720},\n year = {2020},\n url = {https://arxiv.org/abs/2007.12720},\n archivePrefix = {arXiv},\n eprint = {2007.12720}\n}\n", "homepage": "https://github.com/budzianowski/multiwoz/tree/master/data/MultiWOZ_2.2", "license": "Apache License 2.0", "features": {"dialogue_id": {"dtype": "string", "id": null, "_type": "Value"}, "services": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "turns": {"feature": {"turn_id": {"dtype": "string", "id": null, "_type": "Value"}, "speaker": {"num_classes": 2, "names": ["USER", "SYSTEM"], "names_file": null, "id": null, "_type": "ClassLabel"}, "utterance": {"dtype": "string", "id": null, "_type": "Value"}, "frames": {"feature": {"service": {"dtype": "string", "id": null, "_type": "Value"}, "state": {"active_intent": {"dtype": "string", "id": null, "_type": "Value"}, "requested_slots": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "slots_values": {"feature": {"slots_values_name": {"dtype": "string", "id": null, "_type": "Value"}, "slots_values_list": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "length": -1, "id": null, "_type": "Sequence"}}, "slots": {"feature": {"slot": {"dtype": "string", "id": null, "_type": "Value"}, "value": {"dtype": "string", "id": null, "_type": "Value"}, "start": {"dtype": "int32", "id": null, "_type": "Value"}, "exclusive_end": {"dtype": "int32", "id": null, "_type": "Value"}, "copy_from": {"dtype": "string", "id": null, "_type": "Value"}, "copy_from_value": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "length": -1, "id": null, "_type": "Sequence"}}, "length": -1, "id": null, "_type": "Sequence"}, "dialogue_acts": {"dialog_act": {"feature": {"act_type": {"dtype": "string", "id": null, "_type": "Value"}, "act_slots": {"feature": {"slot_name": {"dtype": "string", "id": null, "_type": "Value"}, "slot_value": {"dtype": "string", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}}, "length": -1, "id": null, "_type": "Sequence"}, "span_info": {"feature": {"act_type": {"dtype": "string", "id": null, "_type": "Value"}, "act_slot_name": {"dtype": "string", "id": null, "_type": "Value"}, "act_slot_value": {"dtype": "string", "id": null, "_type": "Value"}, "span_start": {"dtype": "int32", "id": null, "_type": "Value"}, "span_end": {"dtype": "int32", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}}}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "multi_woz_v22", "config_name": "v2.2_active_only", "version": {"version_str": "2.2.0", "description": null, "major": 2, "minor": 2, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 40864793, "num_examples": 8438, "dataset_name": "multi_woz_v22"}, "validation": {"name": "validation", "num_bytes": 5368327, "num_examples": 1000, "dataset_name": "multi_woz_v22"}, "test": {"name": "test", "num_bytes": 5400073, "num_examples": 1000, "dataset_name": "multi_woz_v22"}}, "download_checksums": {"https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/dialog_acts.json": {"num_bytes": 60389517, "checksum": "4a3d43544e331ebbfb85d57ed5902e688489ecc217f8f777dfbb93cc9349a5e4"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_001.json": {"num_bytes": 10678915, "checksum": "2d1a5d92bb5ea1a6017f416f76b43e11bdad945b1f93acf870f2f671a98c3032"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_002.json": {"num_bytes": 10779713, "checksum": "2f3ea771d4e01cb2780357738cff7f7496b87d34c221cc240df74501312438d3"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_003.json": {"num_bytes": 9980185, "checksum": "74f73311936c7b4928b073698e5ea61dedad009dc45672963735684e1279521a"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_004.json": {"num_bytes": 10268501, "checksum": "2f9f18b6cb0abbc58c86ca9291aa19baf80395521f9556cf02189c698c48bc52"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_005.json": {"num_bytes": 10519111, "checksum": "eedbe5c649072a3c163e8da109f3c3fd0502425c63db584a11a9cadaa09c91db"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_006.json": {"num_bytes": 10567892, "checksum": "2a51cfed1224110e4cdce80b051d3f7ebecd223d0b3d1c4ade0dd8fc484675fe"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_007.json": {"num_bytes": 10369619, "checksum": "e062becf19b670a45b9333390b6a72f93fc2ed436371ba342499e6532912b1f3"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_008.json": {"num_bytes": 10207590, "checksum": "9cd73cfae130e4d8c76854b6c0f393d68fb084f665a1c7527e04e3b26f877d1b"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_009.json": {"num_bytes": 10169150, "checksum": "fff3f55ee9bd8ecc2492cdb8101e3d5908705e4edd65b3e8cbd7a825be18e47e"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_010.json": {"num_bytes": 10539115, "checksum": "628db438d4f6ab62fb849d3e9df264845b921961052c19b336c8853e2bf4e8d8"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_011.json": {"num_bytes": 10326640, "checksum": "82e2d2900a037b866a01d05974734dd419e89b329fe29ef93b35eea96d27feb8"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_012.json": {"num_bytes": 10585038, "checksum": "5b18461e0f3ff0698818e02a2e105f4f25727d88d02cc4706de19d138e9ceba0"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_013.json": {"num_bytes": 10471561, "checksum": "0f90ba730400be770f753fc46e868189709e6ce06e97d780843ed09db16762b4"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_014.json": {"num_bytes": 10261423, "checksum": "7bd668216f43f6713232c07dcaa1d84e490eeee15caa1b3d843c3075d4b84a10"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_015.json": {"num_bytes": 10423554, "checksum": "5f551d134860595e7834eedab3ebe16e277953cc81b29f46104ef3070cddd4ac"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_016.json": {"num_bytes": 10218789, "checksum": "22eeed01c15a4fba6ac395a6708400672c5c07dbfbd6448bcb451f8697324881"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_017.json": {"num_bytes": 5020437, "checksum": "a1dba37c0fd1dba519500b57be0384219dd4a7bacaec94e124d431932724bd8d"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/dev/dialogues_001.json": {"num_bytes": 11772283, "checksum": "e42bf1839d0ef2b40800b4a82c59924e0d1b6d86dfda84d6405bbe39682a968f"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/dev/dialogues_002.json": {"num_bytes": 10708953, "checksum": "b9fe16f495dfc35b6e7a54a8d229cbadcb28f0551fb9596780763e3aa5edeecb"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/test/dialogues_001.json": {"num_bytes": 11782790, "checksum": "76921f325905886fafcc6c4ff62c238c48ee8e456a3888c5d8296ff5493f6bb3"}, "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/test/dialogues_002.json": {"num_bytes": 10772014, "checksum": "69bd9b0c8a5650d3dcd70eac16148ac6b27c43d7c3c989aa8b53d08241749771"}}, "download_size": 276812790, "post_processing_size": null, "dataset_size": 51633193, "size_in_bytes": 328445983}}
dummy/v2.2/2.2.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:43bbff0fc91bf2c1824b1010b0385a2c26f4af287597cd9f2c36581c128492b2
3
+ size 14772
multi_woz_v22.py ADDED
@@ -0,0 +1,278 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """MultiWOZ v2.2: Multi-domain Wizard of OZ version 2.2"""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import json
20
+
21
+ import datasets
22
+
23
+
24
+ # TODO: Add BibTeX citation
25
+ # Find for instance the citation on arxiv or on the dataset repo/website
26
+ _CITATION = """\
27
+ @article{corr/abs-2007-12720,
28
+ author = {Xiaoxue Zang and
29
+ Abhinav Rastogi and
30
+ Srinivas Sunkara and
31
+ Raghav Gupta and
32
+ Jianguo Zhang and
33
+ Jindong Chen},
34
+ title = {MultiWOZ 2.2 : {A} Dialogue Dataset with Additional Annotation Corrections
35
+ and State Tracking Baselines},
36
+ journal = {CoRR},
37
+ volume = {abs/2007.12720},
38
+ year = {2020},
39
+ url = {https://arxiv.org/abs/2007.12720},
40
+ archivePrefix = {arXiv},
41
+ eprint = {2007.12720}
42
+ }
43
+ """
44
+
45
+ # TODO: Add description of the dataset here
46
+ # You can copy an official description
47
+ _DESCRIPTION = """\
48
+ Multi-Domain Wizard-of-Oz dataset (MultiWOZ), a fully-labeled collection of human-human written conversations spanning over multiple domains and topics.
49
+ MultiWOZ 2.1 (Eric et al., 2019) identified and fixed many erroneous annotations and user utterances in the original version, resulting in an
50
+ improved version of the dataset. MultiWOZ 2.2 is a yet another improved version of this dataset, which identifies and fizes dialogue state annotation errors
51
+ across 17.3% of the utterances on top of MultiWOZ 2.1 and redefines the ontology by disallowing vocabularies of slots with a large number of possible values
52
+ (e.g., restaurant name, time of booking) and introducing standardized slot span annotations for these slots.
53
+ """
54
+
55
+ _LICENSE = "Apache License 2.0"
56
+
57
+ # TODO: Add link to the official dataset URLs here
58
+ # The HuggingFace dataset library don't host the datasets but only point to the original files
59
+ # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
60
+ _URL_LIST = [
61
+ ("dialogue_acts", "https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/dialog_acts.json")
62
+ ]
63
+ _URL_LIST += [
64
+ (
65
+ f"train_{i:03d}",
66
+ f"https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/train/dialogues_{i:03d}.json",
67
+ )
68
+ for i in range(1, 18)
69
+ ]
70
+ _URL_LIST += [
71
+ (
72
+ f"dev_{i:03d}",
73
+ f"https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/dev/dialogues_{i:03d}.json",
74
+ )
75
+ for i in range(1, 3)
76
+ ]
77
+ _URL_LIST += [
78
+ (
79
+ f"test_{i:03d}",
80
+ f"https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/test/dialogues_{i:03d}.json",
81
+ )
82
+ for i in range(1, 3)
83
+ ]
84
+
85
+ _URLs = dict(_URL_LIST)
86
+
87
+
88
+ class MultiWozV22(datasets.GeneratorBasedBuilder):
89
+
90
+ VERSION = datasets.Version("2.2.0")
91
+
92
+ BUILDER_CONFIGS = [
93
+ datasets.BuilderConfig(name="v2.2", version=datasets.Version("2.2.0"), description="MultiWOZ v2.2"),
94
+ datasets.BuilderConfig(
95
+ name="v2.2_active_only",
96
+ version=datasets.Version("2.2.0"),
97
+ description="MultiWOZ v2.2, only keeps around frames with an active intent",
98
+ ),
99
+ ]
100
+
101
+ DEFAULT_CONFIG_NAME = "v2.2_active_only"
102
+
103
+ def _info(self):
104
+ features = datasets.Features(
105
+ {
106
+ "dialogue_id": datasets.Value("string"),
107
+ "services": datasets.Sequence(datasets.Value("string")),
108
+ "turns": datasets.Sequence(
109
+ {
110
+ "turn_id": datasets.Value("string"),
111
+ "speaker": datasets.ClassLabel(names=["USER", "SYSTEM"]),
112
+ "utterance": datasets.Value("string"),
113
+ "frames": datasets.Sequence(
114
+ {
115
+ "service": datasets.Value("string"),
116
+ "state": {
117
+ "active_intent": datasets.Value("string"),
118
+ "requested_slots": datasets.Sequence(datasets.Value("string")),
119
+ "slots_values": datasets.Sequence(
120
+ {
121
+ "slots_values_name": datasets.Value("string"),
122
+ "slots_values_list": datasets.Sequence(datasets.Value("string")),
123
+ }
124
+ ),
125
+ },
126
+ "slots": datasets.Sequence(
127
+ {
128
+ "slot": datasets.Value("string"),
129
+ "value": datasets.Value("string"),
130
+ "start": datasets.Value("int32"),
131
+ "exclusive_end": datasets.Value("int32"),
132
+ "copy_from": datasets.Value("string"),
133
+ "copy_from_value": datasets.Sequence(datasets.Value("string")),
134
+ }
135
+ ),
136
+ }
137
+ ),
138
+ "dialogue_acts": datasets.Features(
139
+ {
140
+ "dialog_act": datasets.Sequence(
141
+ {
142
+ "act_type": datasets.Value("string"),
143
+ "act_slots": datasets.Sequence(
144
+ datasets.Features(
145
+ {
146
+ "slot_name": datasets.Value("string"),
147
+ "slot_value": datasets.Value("string"),
148
+ }
149
+ ),
150
+ ),
151
+ }
152
+ ),
153
+ "span_info": datasets.Sequence(
154
+ {
155
+ "act_type": datasets.Value("string"),
156
+ "act_slot_name": datasets.Value("string"),
157
+ "act_slot_value": datasets.Value("string"),
158
+ "span_start": datasets.Value("int32"),
159
+ "span_end": datasets.Value("int32"),
160
+ }
161
+ ),
162
+ }
163
+ ),
164
+ }
165
+ ),
166
+ }
167
+ )
168
+ return datasets.DatasetInfo(
169
+ description=_DESCRIPTION,
170
+ features=features, # Here we define them above because they are different between the two configurations
171
+ supervised_keys=None,
172
+ homepage="https://github.com/budzianowski/multiwoz/tree/master/data/MultiWOZ_2.2",
173
+ license=_LICENSE,
174
+ citation=_CITATION,
175
+ )
176
+
177
+ def _split_generators(self, dl_manager):
178
+ data_files = dl_manager.download_and_extract(_URLs)
179
+ self.stored_dialogue_acts = json.load(open(data_files["dialogue_acts"]))
180
+ return [
181
+ datasets.SplitGenerator(
182
+ name=spl_enum,
183
+ gen_kwargs={
184
+ "filepaths": data_files,
185
+ "split": spl,
186
+ },
187
+ )
188
+ for spl, spl_enum in [
189
+ ("train", datasets.Split.TRAIN),
190
+ ("dev", datasets.Split.VALIDATION),
191
+ ("test", datasets.Split.TEST),
192
+ ]
193
+ ]
194
+
195
+ def _generate_examples(self, filepaths, split):
196
+ id_ = -1
197
+ file_list = [fpath for fname, fpath in filepaths.items() if fname.startswith(split)]
198
+ for filepath in file_list:
199
+ dialogues = json.load(open(filepath))
200
+ for dialogue in dialogues:
201
+ id_ += 1
202
+ mapped_acts = self.stored_dialogue_acts.get(dialogue["dialogue_id"], {})
203
+ res = {
204
+ "dialogue_id": dialogue["dialogue_id"],
205
+ "services": dialogue["services"],
206
+ "turns": [
207
+ {
208
+ "turn_id": turn["turn_id"],
209
+ "speaker": turn["speaker"],
210
+ "utterance": turn["utterance"],
211
+ "frames": [
212
+ {
213
+ "service": frame["service"],
214
+ "state": {
215
+ "active_intent": frame["state"]["active_intent"] if "state" in frame else "",
216
+ "requested_slots": frame["state"]["requested_slots"]
217
+ if "state" in frame
218
+ else [],
219
+ "slots_values": {
220
+ "slots_values_name": [
221
+ sv_name for sv_name, sv_list in frame["state"]["slot_values"].items()
222
+ ]
223
+ if "state" in frame
224
+ else [],
225
+ "slots_values_list": [
226
+ sv_list for sv_name, sv_list in frame["state"]["slot_values"].items()
227
+ ]
228
+ if "state" in frame
229
+ else [],
230
+ },
231
+ },
232
+ "slots": [
233
+ {
234
+ "slot": slot["slot"],
235
+ "value": "" if "copy_from" in slot else slot["value"],
236
+ "start": slot.get("exclusive_end", -1),
237
+ "exclusive_end": slot.get("start", -1),
238
+ "copy_from": slot.get("copy_from", ""),
239
+ "copy_from_value": slot["value"] if "copy_from" in slot else [],
240
+ }
241
+ for slot in frame["slots"]
242
+ ],
243
+ }
244
+ for frame in turn["frames"]
245
+ if (
246
+ "active_only" not in self.config.name
247
+ or frame.get("state", {}).get("active_intent", "NONE") != "NONE"
248
+ )
249
+ ],
250
+ "dialogue_acts": {
251
+ "dialog_act": [
252
+ {
253
+ "act_type": act_type,
254
+ "act_slots": {
255
+ "slot_name": [sl_val for sl_name, sl_val in dialog_act],
256
+ "slot_value": [sl_name for sl_name, sl_val in dialog_act],
257
+ },
258
+ }
259
+ for act_type, dialog_act in mapped_acts.get(turn["turn_id"], {})
260
+ .get("dialog_act", {})
261
+ .items()
262
+ ],
263
+ "span_info": [
264
+ {
265
+ "act_type": span_info[0],
266
+ "act_slot_name": span_info[1],
267
+ "act_slot_value": span_info[2],
268
+ "span_start": span_info[3],
269
+ "span_end": span_info[4],
270
+ }
271
+ for span_info in mapped_acts.get(turn["turn_id"], {}).get("span_info", [])
272
+ ],
273
+ },
274
+ }
275
+ for turn in dialogue["turns"]
276
+ ],
277
+ }
278
+ yield id_, res