Igor commited on
Commit
cbe40eb
·
1 Parent(s): dd2d580

Squashed commit of the following:

Browse files

commit 1a87608f637487a9382d85e952d4dedb58b789ef
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Sun Nov 17 00:03:42 2024 +0100

Fix dict get() method

commit 27233f19fd92d03981b7e67875eb58c3fc6228e5
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Sun Nov 17 00:02:11 2024 +0100

Fix issue with OOD label for Base mapping

commit 66b86ce1e9388503b83008926b0a6fccead3d224
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Sun Nov 17 00:01:07 2024 +0100

Update daiso.py

commit d1f7b01748a2cb4d8d8c7c37726195ff73609216
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Sat Nov 16 23:54:37 2024 +0100

Update daiso.py

commit 61d46ad8b8d147104d9da70bcc4008eecfeb7175
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Sat Nov 16 23:52:45 2024 +0100

Update daiso.py

commit e0c2ae1678402d85476ff9f736ba52f5c1879586
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Sat Nov 16 23:43:08 2024 +0100

Update daiso.py

commit 84991399f4c065e7d4cad64312f279457d284108
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Fri Nov 15 22:57:32 2024 +0100

Fix LAbel_Base to ClassLabel

commit 24184a2a09e70deecbb443b618e3be9d10b519a2
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Thu Nov 14 22:48:40 2024 +0100

Ensure new labels appear

commit 6427dab4c9be1da9329a447fed4a8822ee1b59ba
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Thu Nov 14 22:34:23 2024 +0100

Add Base label name (meaning of the Label)

commit fba9d09c331936ee127e47fcb250b547afb3fc86
Author: Igor Kuzmin <igorkuz.tech@gmail.com>
Date: Mon Feb 5 01:10:35 2024 +0100

Update daiso.py

commit 7b407dddd086629dcab71727baf7507193b257ae
Author: Igor Kuzmin <igorkuz.tech@gmail.com>
Date: Mon Feb 5 01:07:09 2024 +0100

Update daiso.py

commit 35f9d9fc6de76cd9af50fb83b3bedea2afe04e37
Author: Igor Kuzmin <igorkuz.tech@gmail.com>
Date: Mon Feb 5 01:03:07 2024 +0100

Update daiso.py

commit 998d3126acb2fd6aa431297f12c7829dacff0632
Author: Igor Kuzmin <igorkuz.tech@gmail.com>
Date: Mon Feb 5 01:01:30 2024 +0100

Update daiso.py

commit e3325f2c0d478ada7dabb33d8d66047902be0ecf
Author: Igor Kuzmin <igorkuz.tech@gmail.com>
Date: Mon Feb 5 00:37:48 2024 +0100

update headers

commit 2e9075ea4729947f37e0718a3f7ef747fbf4f9b4
Author: Igor Kuzmin <igoranchikkuzmin@yandex.ru>
Date: Wed Jan 24 17:11:14 2024 +0100

update 'None' case (colab exeception)

commit 1a43af5379183db17ee1556cc6dc6921db23c853
Author: Igor Kuzmin <igoranchikkuzmin@yandex.ru>
Date: Tue Nov 21 11:46:32 2023 +0100

update datasets config (dialogue_id)

commit fab651c2aaa7929f11e8f28154eef317b719798c
Author: Igor Kuzmin <igoranchikkuzmin@yandex.ru>
Date: Mon Nov 20 14:51:40 2023 +0100

minor(dev): update OOD

commit 17d31a9246afdcab22f1229d04c152be43fdb8c8
Author: Igor Kuzmin <igoranchikkuzmin@yandex.ru>
Date: Mon Nov 20 14:44:57 2023 +0100

minor(dev): fix for OOD

commit 393d6986bed9d77b0325f1861b31420597e3c996
Author: Igor Kuzmin <igoranchikkuzmin@yandex.ru>
Date: Mon Nov 20 14:42:40 2023 +0100

fix(dev): fix label

commit 4b7b23a7dffec6a72bf51e1b3e38a56de5b9830b
Author: Igor Kuzmin <igoranchikkuzmin@yandex.ru>
Date: Mon Nov 20 14:40:27 2023 +0100

minor(dev): update OOD

commit ef182a35c896c0b89ae4a272ee85731e42e5912a
Author: Igor Kuzmin <igoranchikkuzmin@yandex.ru>
Date: Mon Nov 20 14:30:31 2023 +0100

upd(dev): update None labels to OOD

commit e844ddca95e8bdd9a6b3444742e719718290b959
Author: Igor Kuzmin <igoranchikkuzmin@yandex.ru>
Date: Wed Nov 15 14:40:55 2023 +0100

fix(dev): add speaker label in dyda config

commit 79c0f657fc11d3255c45c5fb953d6c01086553e0
Author: Igor Kuzmin <igoranchikkuzmin@yandex.ru>
Date: Wed Nov 15 14:36:21 2023 +0100

fix(dev): fix dyda speaker labels

commit 154dc4dacfeae43fe784dbbaa4f3c87d313e2249
Author: Igor Kuzmin <igoranchikkuzmin@yandex.ru>
Date: Wed Nov 15 14:27:08 2023 +0100

fix(dev): fix dataset init

commit c0fc3592947c28f504e33d5db00cdc8f86ac31b6
Author: Igor Kuzmin <igoranchikkuzmin@yandex.ru>
Date: Wed Nov 15 14:24:55 2023 +0100

feat(dev): add speaker ids support

commit 24ce672c454b0e1ecd055ef24a99c3ae1a7a47cd
Author: Igor Kuzmin <igorkuz.tech@gmail.com>
Date: Thu Oct 26 01:39:04 2023 +0200

minor(dev): dstc3 nan fix

commit c28d966e40a21795ea2952935dbd3d5837590297
Author: Igor Kuzmin <igorkuz.tech@gmail.com>
Date: Thu Oct 26 01:34:20 2023 +0200

minor(dev): fix nan

commit ca52c8c3785757df14c4d48cadf8e1b2f08b2dbb
Author: Igor Kuzmin <igorkuz.tech@gmail.com>
Date: Thu Oct 26 00:16:59 2023 +0200

minor(dev): fix header

commit b4ef46e368a8ec35949571ee843da338771e7fff
Author: Igor Kuzmin <igorkuz.tech@gmail.com>
Date: Thu Oct 26 00:12:18 2023 +0200

minor(dev): fix loading issue

commit 3c9268babd1560a5baac54c95487c078ec2eb1af
Author: Igor Kuzmin <igorkuz.tech@gmail.com>
Date: Wed Oct 25 23:40:20 2023 +0200

minor(dev): add labels/citations

commit c7053dd29204ca4bd7cc99e799cfcce990e018c9
Author: Igor Kuzmin <igorkuz.tech@gmail.com>
Date: Wed Oct 25 20:29:43 2023 +0200

minor(dev): update unique labels computation

commit bae45562f954b8b32ff631fb5c80ebfac2225b41
Author: Igor Kuzmin <igorkuz.tech@gmail.com>
Date: Wed Oct 25 20:28:13 2023 +0200

mminor(dev): fix unique names from ISO

commit 8e5fadd9984857961c73e856e5031a24833d3330
Author: Igor Kuzmin <igorkuz.tech@gmail.com>
Date: Wed Oct 25 20:19:42 2023 +0200

minor(dev): update dataset config

commit 759a49e734aa909414d92022584da206845d66b4
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Sat Oct 14 23:21:52 2023 +0200

minor(dev): test mapping

commit fc6d856707e1a2db7c688720d62044a86c948a7a
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Sat Oct 14 23:18:23 2023 +0200

minor(dev): test mapping

commit 0bf8e1e6328833a100a484e7ca499b3dc81a20ef
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Sat Oct 14 23:17:19 2023 +0200

minor(dev): test mapping

commit ecde8b446d6f6997cfaa3b71846b39ee5ca5ffe4
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Sat Oct 14 23:13:10 2023 +0200

minor(dev): test mapping

commit 5158c526f995ab4be41a624903e105278883dd64
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Sat Oct 14 23:09:58 2023 +0200

minor(dev): test mapping

commit 3a6468c1f199d089f4c3b8b682a89cb45c63fcc4
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Sat Oct 14 23:07:43 2023 +0200

minor(dev): test mapping

commit 3a1843e57c7581c3b0d5189f0394f81be49d8967
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Sat Oct 14 23:06:39 2023 +0200

minor(dev): test mapping

commit 34e43aa75d6caba0bdb01302db7d670a5061c9ee
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Sat Oct 14 20:55:52 2023 +0200

minor(dev): fix splits

commit 4ba01ca985c8c61acbdfe8083a70d06dde677e95
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Sat Oct 14 20:44:29 2023 +0200

minor(dev): delete Label column

commit 21ac4e0b6547ef1653b30d38a48a39da9587abfa
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Sat Oct 14 20:40:25 2023 +0200

minor(dev): fix dataset features

commit c86a0472b585cfbfd63a3c123aca0f978a8ac46b
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Sat Oct 14 20:37:52 2023 +0200

minor(dev): fix dataset name

commit 2a5f91a6d88c0e6da5e504626464dda528849fa4
Author: Igor <igoranchikkuzmin@yandex.ru>
Date: Sat Oct 14 20:27:59 2023 +0200

feat(dev): add download script

Files changed (1) hide show
  1. daiso.py +1495 -0
daiso.py ADDED
@@ -0,0 +1,1495 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ # TODO: Address all TODOs and remove all explanatory comments
15
+ """TODO: Add a description here."""
16
+
17
+ import textwrap
18
+ import csv
19
+ import pandas as pd
20
+ import json
21
+ import os
22
+
23
+ import datasets
24
+
25
+ _VERSION = datasets.Version("1.1.0")
26
+
27
+ # TODO: Add BibTeX citation
28
+ # Find for instance the citation on arxiv or on the dataset repo/website
29
+ _DAISO_CITATION = """\
30
+ @InProceedings{huggingface:dataset,
31
+ title = {A great new dataset},
32
+ author={Igor Kuzmin
33
+ },
34
+ year={2023}
35
+ }
36
+ """
37
+
38
+ # TODO: Add description of the dataset here
39
+ # You can copy an official description
40
+ _DAISO_DESCRIPTION = """\
41
+ This new dataset is designed to solve this great NLP task and is crafted with a lot of care.
42
+ """
43
+
44
+ # TODO: Add a link to an official homepage for the dataset here
45
+ _HOMEPAGE = ""
46
+
47
+ # TODO: Add the licence for the dataset here if you can find it
48
+ _LICENSE = ""
49
+
50
+ # TODO: Add link to the official dataset URLs here
51
+ # The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
52
+ # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
53
+ _URL = "https://raw.githubusercontent.com/igorktech/DAISO-benchmark/dev"
54
+
55
+ LABELS_MAPPING = {
56
+ "ami": {
57
+ "bck": {
58
+ "base": "Backchannel",
59
+ "ISO": "feedback"
60
+ },
61
+ "stl": {
62
+ "base": "Stall",
63
+ "ISO": "OOD"
64
+ },
65
+ "fra": {
66
+ "base": "Fragment",
67
+ "ISO": "OOD"
68
+ },
69
+ "inf": {
70
+ "base": "Inform",
71
+ "ISO": "inform"
72
+ },
73
+ "sug": {
74
+ "base": "Suggest",
75
+ "ISO": "directive"
76
+ },
77
+ "ass": {
78
+ "base": "Assess",
79
+ "ISO": "feedback"
80
+ },
81
+ "el.inf": {
82
+ "base": "Elicit-Inform",
83
+ "ISO": "OOD"
84
+ },
85
+ "el.sug": {
86
+ "base": "Elicit-Offer-Or-Suggestion",
87
+ "ISO": "directive"
88
+ },
89
+ "el.ass": {
90
+ "base": "Elicit-Assessment",
91
+ "ISO": "OOD"
92
+ },
93
+ "el.und": {
94
+ "base": "Elicit-Comment-Understanding",
95
+ "ISO": "OOD"
96
+ },
97
+ "off": {
98
+ "base": "Offer",
99
+ "ISO": "commissive"
100
+ },
101
+ "und": {
102
+ "base": "Comment-About-Understanding",
103
+ "ISO": "feedback"
104
+ },
105
+ "be.pos": {
106
+ "base": "Be-Positive",
107
+ "ISO": "OOD"
108
+ },
109
+ "be.neg": {
110
+ "base": "Be-Negative",
111
+ "ISO": "OOD"
112
+ },
113
+ "oth": {
114
+ "base": "Other",
115
+ "ISO": "OOD"
116
+ },
117
+ None: {
118
+ "base": "OOD",
119
+ "ISO": "OOD"
120
+ }
121
+ },
122
+ "oasis": {
123
+ "inform": {
124
+ "base": "Inform",
125
+ "ISO": "inform"
126
+ },
127
+ "ackn": {
128
+ "base": "Acknowledge",
129
+ "ISO": "feedback"
130
+ },
131
+ "reqInfo": {
132
+ "base": "Request Inform",
133
+ "ISO": "directive"
134
+ },
135
+ "backch": {
136
+ "base": "Backchannel",
137
+ "ISO": "feedback"
138
+ },
139
+ "answ": {
140
+ "base": "Answer",
141
+ "ISO": "answer"
142
+ },
143
+ "init": {
144
+ "base": "Initialise",
145
+ "ISO": "discourse"
146
+ },
147
+ "thank": {
148
+ "base": "Thank",
149
+ "ISO": "thanking"
150
+ },
151
+ "greet": {
152
+ "base": "Greet",
153
+ "ISO": "greeting"
154
+ },
155
+ "accept": {
156
+ "base": "Accept",
157
+ "ISO": "agreement"
158
+ },
159
+ "answElab": {
160
+ "base": "Answer Elaborate",
161
+ "ISO": "inform"
162
+ },
163
+ "informIntent": {
164
+ "base": "Inform Intention",
165
+ "ISO": "commissive"
166
+ },
167
+ "bye": {
168
+ "base": "Bye",
169
+ "ISO": "goodbye"
170
+ },
171
+ "direct": {
172
+ "base": "Direct",
173
+ "ISO": "directive"
174
+ },
175
+ "confirm": {
176
+ "base": "Confirm",
177
+ "ISO": "answer"
178
+ },
179
+ "expressRegret": {
180
+ "base": "Express Regret",
181
+ "ISO": "apology"
182
+ },
183
+ "hold": {
184
+ "base": "Hold",
185
+ "ISO": "turn"
186
+ },
187
+ "expressOpinion": {
188
+ "base": "Express Opinion",
189
+ "ISO": "inform"
190
+ },
191
+ "offer": {
192
+ "base": "Offer",
193
+ "ISO": "commissive"
194
+ },
195
+ "echo": {
196
+ "base": "Echo",
197
+ "ISO": "feedback"
198
+ },
199
+ "appreciate": {
200
+ "base": "Appreciate",
201
+ "ISO": "feedback"
202
+ },
203
+ "refer": {
204
+ "base": "Refer",
205
+ "ISO": "OOD"
206
+ },
207
+ "suggest": {
208
+ "base": "Suggest",
209
+ "ISO": "directive"
210
+ },
211
+ "reqDirect": {
212
+ "base": "Request Direct",
213
+ "ISO": "directive"
214
+ },
215
+ "negate": {
216
+ "base": "Negate",
217
+ "ISO": "disagreement"
218
+ },
219
+ "exclaim": {
220
+ "base": "Exclaim",
221
+ "ISO": "OOD"
222
+ },
223
+ "pardon": {
224
+ "base": "Pardon",
225
+ "ISO": "apology"
226
+ },
227
+ "identifySelf": {
228
+ "base": "Identify Self",
229
+ "ISO": "OOD"
230
+ },
231
+ "expressPossibility": {
232
+ "base": "Express Possibility",
233
+ "ISO": "inform"
234
+ },
235
+ "raiseIssue": {
236
+ "base": "Raise Issue",
237
+ "ISO": "OOD"
238
+ },
239
+ "expressWish": {
240
+ "base": "Express Wish",
241
+ "ISO": "inform"
242
+ },
243
+ "reqModal": {
244
+ "base": "Request Modal",
245
+ "ISO": "directive"
246
+ },
247
+ "complete": {
248
+ "base": "Complete",
249
+ "ISO": "OOD"
250
+ },
251
+ "directElab": {
252
+ "base": "Direct Elaborate",
253
+ "ISO": "directive"
254
+ },
255
+ "correct": {
256
+ "base": "Correct",
257
+ "ISO": "OOD"
258
+ },
259
+ "refuse": {
260
+ "base": "Refuse",
261
+ "ISO": "OOD"
262
+ },
263
+ "informIntent-hold": {
264
+ "base": "Inform Intent Hold",
265
+ "ISO": "OOD"
266
+ },
267
+ "informDisc": {
268
+ "base": "Inform Continue",
269
+ "ISO": "OOD"
270
+ },
271
+ "informCont": {
272
+ "base": "Inform Discontinue",
273
+ "ISO": "OOD"
274
+ },
275
+ "selfTalk": {
276
+ "base": "Self Talk",
277
+ "ISO": "OOD"
278
+ },
279
+ "correctSelf": {
280
+ "base": "Correct Self",
281
+ "ISO": "disagreement"
282
+ },
283
+ "expressRegret-inform": {
284
+ "base": "Express Regret Inform",
285
+ "ISO": "OOD"
286
+ },
287
+ "thank-identifySelf": {
288
+ "base": "Thank Identify Self",
289
+ "ISO": "OOD"
290
+ }
291
+ },
292
+ "maptask": {
293
+ "acknowledge": {
294
+ "base": "Acknowledge",
295
+ "ISO": "feedback"
296
+ },
297
+ "instruct": {
298
+ "base": "Instruct",
299
+ "ISO": "directive"
300
+ },
301
+ "reply_y": {
302
+ "base": "Yes-Reply",
303
+ "ISO": "answer"
304
+ },
305
+ "explain": {
306
+ "base": "Explain",
307
+ "ISO": "inform"
308
+ },
309
+ "check": {
310
+ "base": "Check",
311
+ "ISO": "feedback"
312
+ },
313
+ "ready": {
314
+ "base": "Ready",
315
+ "ISO": "discourse"
316
+ },
317
+ "align": {
318
+ "base": "Check Attention",
319
+ "ISO": "OOD"
320
+ },
321
+ "query_yn": {
322
+ "base": "Yes-No-Question",
323
+ "ISO": "propq"
324
+ },
325
+ "clarify": {
326
+ "base": "Clarify",
327
+ "ISO": "inform"
328
+ },
329
+ "reply_w": {
330
+ "base": "Non Yes-No-Reply",
331
+ "ISO": "answer"
332
+ },
333
+ "reply_n": {
334
+ "base": "No-Reply",
335
+ "ISO": "answer"
336
+ },
337
+ "query_w": {
338
+ "base": "Non Yes-No-Question",
339
+ "ISO": "setq"
340
+ }
341
+ },
342
+ "mrda": {
343
+ "s": {
344
+ "base": "Statement",
345
+ "ISO": "inform"
346
+ },
347
+ "b": {
348
+ "base": "Continuer (backchannel)",
349
+ "ISO": "feedback"
350
+ },
351
+ "fh": {
352
+ "base": "Floor Holder",
353
+ "ISO": "turn"
354
+ },
355
+ "bk": {
356
+ "base": "Acknowledge-answer",
357
+ "ISO": "feedback"
358
+ },
359
+ "aa": {
360
+ "base": "Accept",
361
+ "ISO": "agreement"
362
+ },
363
+ "df": {
364
+ "base": "Defending/Explanation",
365
+ "ISO": "inform"
366
+ },
367
+ "e": {
368
+ "base": "Expansions of y/n Answers",
369
+ "ISO": "answer"
370
+ },
371
+ "%": {
372
+ "base": "Interrupted/Abandoned/Uninterpretable",
373
+ "ISO": "OOD"
374
+ },
375
+ "rt": {
376
+ "base": "Rising Tone",
377
+ "ISO": "OOD"
378
+ },
379
+ "fg": {
380
+ "base": "Floor Grabber",
381
+ "ISO": "turn"
382
+ },
383
+ "cs": {
384
+ "base": "Offer",
385
+ "ISO": "commissive"
386
+ },
387
+ "ba": {
388
+ "base": "Assessment/Appreciation",
389
+ "ISO": "feedback"
390
+ },
391
+ "bu": {
392
+ "base": "Understanding Check",
393
+ "ISO": "feedback"
394
+ },
395
+ "d": {
396
+ "base": "Declarative-Question",
397
+ "ISO": "propq"
398
+ },
399
+ "na": {
400
+ "base": "Affirmative Non-yes Answers",
401
+ "ISO": "answer"
402
+ },
403
+ "qw": {
404
+ "base": "Wh-Question",
405
+ "ISO": "setq"
406
+ },
407
+ "ar": {
408
+ "base": "Reject",
409
+ "ISO": "disagreement"
410
+ },
411
+ "2": {
412
+ "base": "Collaborative Completion",
413
+ "ISO": "OOD"
414
+ },
415
+ "no": {
416
+ "base": "Other Answers",
417
+ "ISO": "answer"
418
+ },
419
+ "h": {
420
+ "base": "Hold Before Answer/Agreement",
421
+ "ISO": "turn"
422
+ },
423
+ "co": {
424
+ "base": "Action-directive",
425
+ "ISO": "directive"
426
+ },
427
+ "qy": {
428
+ "base": "Yes-No-question",
429
+ "ISO": "propq"
430
+ },
431
+ "nd": {
432
+ "base": "Dispreferred Answers",
433
+ "ISO": "answer"
434
+ },
435
+ "j": {
436
+ "base": "Humorous Material",
437
+ "ISO": "OOD"
438
+ },
439
+ "bd": {
440
+ "base": "Downplayer",
441
+ "ISO": "apology"
442
+ },
443
+ "cc": {
444
+ "base": "Commit",
445
+ "ISO": "commissive"
446
+ },
447
+ "ng": {
448
+ "base": "Negative Non-no Answers",
449
+ "ISO": "answer"
450
+ },
451
+ "am": {
452
+ "base": "Maybe",
453
+ "ISO": "OOD"
454
+ },
455
+ "qrr": {
456
+ "base": "Or-Clause",
457
+ "ISO": "choiceq"
458
+ },
459
+ "fe": {
460
+ "base": "Exclamation",
461
+ "ISO": "feedback"
462
+ },
463
+ "m": {
464
+ "base": "Mimic Other",
465
+ "ISO": "OOD"
466
+ },
467
+ "fa": {
468
+ "base": "Apology",
469
+ "ISO": "apology"
470
+ },
471
+ "t": {
472
+ "base": "About-task",
473
+ "ISO": "OOD"
474
+ },
475
+ "br": {
476
+ "base": "Signal-non-understanding",
477
+ "ISO": "feedback"
478
+ },
479
+ "aap": {
480
+ "base": "Accept-part",
481
+ "ISO": "OOD"
482
+ },
483
+ "qh": {
484
+ "base": "Rhetorical-Question",
485
+ "ISO": "inform"
486
+ },
487
+ "tc": {
488
+ "base": "Topic Change",
489
+ "ISO": "discourse"
490
+ },
491
+ "r": {
492
+ "base": "Repeat",
493
+ "ISO": "inform"
494
+ },
495
+ "t1": {
496
+ "base": "Self-talk",
497
+ "ISO": "OOD"
498
+ },
499
+ "t3": {
500
+ "base": "3rd-party-talk",
501
+ "ISO": "OOD"
502
+ },
503
+ "bh": {
504
+ "base": "Rhetorical-question Continue",
505
+ "ISO": "propq"
506
+ },
507
+ "bsc": {
508
+ "base": "Reject-part",
509
+ "ISO": "OOD"
510
+ },
511
+ "arp": {
512
+ "base": "Misspeak Self-Correction",
513
+ "ISO": "OOD"
514
+ },
515
+ "bs": {
516
+ "base": "Reformulate/Summarize",
517
+ "ISO": "feedback"
518
+ },
519
+ "f": {
520
+ "base": "Follow Me",
521
+ "ISO": "OOD"
522
+ },
523
+ "qr": {
524
+ "base": "Or-Question",
525
+ "ISO": "choiceq"
526
+ },
527
+ "ft": {
528
+ "base": "Thanking",
529
+ "ISO": "thanking"
530
+ },
531
+ "g": {
532
+ "base": "Tag-Question",
533
+ "ISO": "propq"
534
+ },
535
+ "qo": {
536
+ "base": "Open-Question",
537
+ "ISO": "OOD"
538
+ },
539
+ "bc": {
540
+ "base": "Correct-misspeaking",
541
+ "ISO": "OOD"
542
+ },
543
+ "by": {
544
+ "base": "Sympathy",
545
+ "ISO": "apology"
546
+ },
547
+ "fw": {
548
+ "base": "Welcome",
549
+ "ISO": "thanking"
550
+ }
551
+ },
552
+ "swda": {
553
+ "sd": {
554
+ "base": "Statement-non-opinion",
555
+ "ISO": "inform"
556
+ },
557
+ "b": {
558
+ "base": "Acknowledge (Backchannel)",
559
+ "ISO": "feedback"
560
+ },
561
+ "sv": {
562
+ "base": "Statement-opinion",
563
+ "ISO": "inform"
564
+ },
565
+ "%": {
566
+ "base": "Uninterpretable",
567
+ "ISO": "OOD"
568
+ },
569
+ "aa": {
570
+ "base": "Agree/Accept",
571
+ "ISO": "agreement"
572
+ },
573
+ "ba": {
574
+ "base": "Appreciation",
575
+ "ISO": "feedback"
576
+ },
577
+ "qy": {
578
+ "base": "Yes-No-Question",
579
+ "ISO": "propq"
580
+ },
581
+ "ny": {
582
+ "base": "Yes Answers",
583
+ "ISO": "answer"
584
+ },
585
+ "fc": {
586
+ "base": "Conventional-closing",
587
+ "ISO": "discourse"
588
+ },
589
+ "qw": {
590
+ "base": "Wh-Question",
591
+ "ISO": "setq"
592
+ },
593
+ "nn": {
594
+ "base": "No Answers",
595
+ "ISO": "answer"
596
+ },
597
+ "bk": {
598
+ "base": "Response Acknowledgement",
599
+ "ISO": "feedback"
600
+ },
601
+ "h": {
602
+ "base": "Hedge",
603
+ "ISO": "answer"
604
+ },
605
+ "qy^d": {
606
+ "base": "Declarative Yes-No-Question",
607
+ "ISO": "propq"
608
+ },
609
+ "bh": {
610
+ "base": "Backchannel in Question Form",
611
+ "ISO": "propq"
612
+ },
613
+ "^q": {
614
+ "base": "Quotation",
615
+ "ISO": "OOD"
616
+ },
617
+ "bf": {
618
+ "base": "Summarize/Reformulate",
619
+ "ISO": "feedback"
620
+ },
621
+ "fo": {
622
+ "base": "Other forward-looking functions",
623
+ "ISO": "commissive"
624
+ },
625
+ "by": {
626
+ "base": "Sympathy",
627
+ "ISO": "apology"
628
+ },
629
+ "fw": {
630
+ "base": "Welcome",
631
+ "ISO": "thanking"
632
+ },
633
+ "o_\"_bc": {
634
+ "base": "Other",
635
+ "ISO": "OOD"
636
+ },
637
+ "na": {
638
+ "base": "Affirmative Non-yes Answers",
639
+ "ISO": "answer"
640
+ },
641
+ "ad": {
642
+ "base": "Action-directive",
643
+ "ISO": "directive"
644
+ },
645
+ "^2": {
646
+ "base": "Collaborative Completion",
647
+ "ISO": "OOD"
648
+ },
649
+ "b^m": {
650
+ "base": "Repeat-phrase",
651
+ "ISO": "feedback"
652
+ },
653
+ "qo": {
654
+ "base": "Open-Question",
655
+ "ISO": "OOD"
656
+ },
657
+ "qh": {
658
+ "base": "Rhetorical-Question",
659
+ "ISO": "inform"
660
+ },
661
+ "^h": {
662
+ "base": "Hold Before Answer/Agreement",
663
+ "ISO": "turn"
664
+ },
665
+ "ar": {
666
+ "base": "Reject",
667
+ "ISO": "disagreement"
668
+ },
669
+ "ng": {
670
+ "base": "Negative Non-no Answers",
671
+ "ISO": "answer"
672
+ },
673
+ "br": {
674
+ "base": "Signal-non-understanding",
675
+ "ISO": "feedback"
676
+ },
677
+ "no": {
678
+ "base": "Other Answers",
679
+ "ISO": "answer"
680
+ },
681
+ "fp": {
682
+ "base": "Conventional-opening",
683
+ "ISO": "discourse"
684
+ },
685
+ "qrr": {
686
+ "base": "Or-Clause",
687
+ "ISO": "choiceq"
688
+ },
689
+ "arp_nd": {
690
+ "base": "Dispreferred Answers",
691
+ "ISO": "answer"
692
+ },
693
+ "t3": {
694
+ "base": "3rd-party-talk",
695
+ "ISO": "OOD"
696
+ },
697
+ "oo": {
698
+ "base": "Offers",
699
+ "ISO": "directive"
700
+ },
701
+ "co_cc": {
702
+ "base": "Options Commits",
703
+ "ISO": "commissive"
704
+ },
705
+ "aap_am": {
706
+ "base": "Maybe/Accept-part",
707
+ "ISO": "OOD"
708
+ },
709
+ "t1": {
710
+ "base": "Downplayer",
711
+ "ISO": "apology"
712
+ },
713
+ "bd": {
714
+ "base": "Self-talk",
715
+ "ISO": "OOD"
716
+ },
717
+ "^g": {
718
+ "base": "Tag-Question",
719
+ "ISO": "propq"
720
+ },
721
+ "qw^d": {
722
+ "base": "Declarative Wh-Question",
723
+ "ISO": "setq"
724
+ },
725
+ "fa": {
726
+ "base": "Apology",
727
+ "ISO": "apology"
728
+ },
729
+ "ft": {
730
+ "base": "Thanking",
731
+ "ISO": "thanking"
732
+ }
733
+ },
734
+ "frames": {
735
+ "inform": {
736
+ "base": "Inform",
737
+ "ISO": "inform"
738
+ },
739
+ "sorry": {
740
+ "base": "Sorry",
741
+ "ISO": "apology"
742
+ },
743
+ "suggest": {
744
+ "base": "Suggest",
745
+ "ISO": "directive"
746
+ },
747
+ "negate": {
748
+ "base": "Negate",
749
+ "ISO": "disagreement"
750
+ },
751
+ "thankyou": {
752
+ "base": "Thank you",
753
+ "ISO": "thanking"
754
+ },
755
+ "greeting": {
756
+ "base": "Greeting",
757
+ "ISO": "greeting"
758
+ },
759
+ "request": {
760
+ "base": "Request",
761
+ "ISO": "directive"
762
+ },
763
+ "switch_frame": {
764
+ "base": "Switch Frame",
765
+ "ISO": "OOD"
766
+ },
767
+ "offer": {
768
+ "base": "Offer",
769
+ "ISO": "commissive"
770
+ },
771
+ "request_alts": {
772
+ "base": "Request Alternative",
773
+ "ISO": "directive"
774
+ },
775
+ "null": {
776
+ "base": "Other",
777
+ "ISO": "OOD"
778
+ },
779
+ "goodbye": {
780
+ "base": "Goodbye",
781
+ "ISO": "goodbye"
782
+ },
783
+ "moreinfo": {
784
+ "base": "Request More information",
785
+ "ISO": "directive"
786
+ },
787
+ "no_result": {
788
+ "base": "No Result",
789
+ "ISO": "OOD"
790
+ },
791
+ "affirm": {
792
+ "base": "Affirm",
793
+ "ISO": "answer"
794
+ },
795
+ "request_compare": {
796
+ "base": "Request Compare",
797
+ "ISO": "directive"
798
+ },
799
+ "confirm": {
800
+ "base": "Confirm",
801
+ "ISO": "answer"
802
+ },
803
+ "hearmore": {
804
+ "base": "Hear More",
805
+ "ISO": "OOD"
806
+ },
807
+ "canthelp": {
808
+ "base": "Can not help",
809
+ "ISO": "OOD"
810
+ },
811
+ "you_are_welcome": {
812
+ "base": "Welcome",
813
+ "ISO": "thanking"
814
+ },
815
+ "reject": {
816
+ "base": "Reject",
817
+ "ISO": "disagreement"
818
+ },
819
+ None: {
820
+ "base": "None",
821
+ "ISO": "OOD"
822
+ }
823
+ },
824
+ "dyda": {
825
+ "commissive": {
826
+ "base": "Commissive",
827
+ "ISO": "commissive"
828
+ },
829
+ "directive": {
830
+ "base": "Directive",
831
+ "ISO": "directive"
832
+ },
833
+ "inform": {
834
+ "base": "Inform",
835
+ "ISO": "inform"
836
+ },
837
+ "question": {
838
+ "base": "Question",
839
+ "ISO": "OOD"
840
+ }
841
+ },
842
+ "dstc3": {
843
+ "welcomemsg": {
844
+ "base": "Welcome",
845
+ "ISO": "thanking"
846
+ },
847
+ "inform": {
848
+ "base": "Inform",
849
+ "ISO": "inform"
850
+ },
851
+ "select": {
852
+ "base": "Select",
853
+ "ISO": "OOD"
854
+ },
855
+ "expl-conf": {
856
+ "base": "Explicit Confirmation",
857
+ "ISO": "answer"
858
+ },
859
+ "affirm": {
860
+ "base": "Affirmation",
861
+ "ISO": "answer"
862
+ },
863
+ "canthelp": {
864
+ "base": "Can not help",
865
+ "ISO": "OOD"
866
+ },
867
+ "request": {
868
+ "base": "Request",
869
+ "ISO": "directive"
870
+ },
871
+ "bye": {
872
+ "base": "Goodbye",
873
+ "ISO": "goodbye"
874
+ },
875
+ "offer": {
876
+ "base": "Offer",
877
+ "ISO": "commissive"
878
+ },
879
+ "thankyou": {
880
+ "base": "Thank you",
881
+ "ISO": "thanking"
882
+ },
883
+ "negate": {
884
+ "base": "Negate",
885
+ "ISO": "disagreement"
886
+ },
887
+ "null": {
888
+ "base": "Other",
889
+ "ISO": "OOD"
890
+ },
891
+ "reqalts": {
892
+ "base": "Request Alternative",
893
+ "ISO": "directive"
894
+ },
895
+ "canthelp.missing_slot_value": {
896
+ "base": "Can not help",
897
+ "ISO": "OOD"
898
+ },
899
+ "restart": {
900
+ "base": "Restart",
901
+ "ISO": "OOD"
902
+ },
903
+ "ack": {
904
+ "base": "Acknowledge",
905
+ "ISO": "feedback"
906
+ },
907
+ "reqmore": {
908
+ "base": "Request More",
909
+ "ISO": "directive"
910
+ },
911
+ "confirm": {
912
+ "base": "Confirm",
913
+ "ISO": "answer"
914
+ },
915
+ "hello": {
916
+ "base": "Hello",
917
+ "ISO": "greeting"
918
+ },
919
+ "repeat": {
920
+ "base": "Repeat",
921
+ "ISO": "inform"
922
+ },
923
+ "deny": {
924
+ "base": "Deny",
925
+ "ISO": "answer"
926
+ },
927
+ None: {
928
+ "base": "None",
929
+ "ISO": "OOD"
930
+ }
931
+ },
932
+ "dstc8-sgd": {
933
+ "INFORM": {
934
+ "base": "Inform",
935
+ "ISO": "inform"
936
+ },
937
+ "REQUEST": {
938
+ "base": "Request",
939
+ "ISO": "directive"
940
+ },
941
+ "CONFIRM": {
942
+ "base": "Confirm",
943
+ "ISO": "answer"
944
+ },
945
+ "AFFIRM": {
946
+ "base": "Affirmation",
947
+ "ISO": "answer"
948
+ },
949
+ "NOTIFY_FAILURE": {
950
+ "base": "Notify Failure",
951
+ "ISO": "inform"
952
+ },
953
+ "THANK_YOU": {
954
+ "base": "Thank you",
955
+ "ISO": "thanking"
956
+ },
957
+ "REQ_MORE": {
958
+ "base": "Request More",
959
+ "ISO": "directive"
960
+ },
961
+ "NEGATE": {
962
+ "base": "Negate",
963
+ "ISO": "disagreement"
964
+ },
965
+ "GOODBYE": {
966
+ "base": "Goodbye",
967
+ "ISO": "goodbye"
968
+ },
969
+ "NOTIFY_SUCCESS": {
970
+ "base": "Notify Success",
971
+ "ISO": "inform"
972
+ },
973
+ "INFORM_INTENT": {
974
+ "base": "Inform Intention",
975
+ "ISO": "commissive"
976
+ },
977
+ "OFFER": {
978
+ "base": "Offer",
979
+ "ISO": "commissive"
980
+ },
981
+ "SELECT": {
982
+ "base": "Select",
983
+ "ISO": "OOD"
984
+ },
985
+ "OFFER_INTENT": {
986
+ "base": "Offer Intent",
987
+ "ISO": "commissive"
988
+ },
989
+ "NEGATE_INTENT": {
990
+ "base": "Negate Intent",
991
+ "ISO": "disagreement"
992
+ },
993
+ "REQUEST_ALTS": {
994
+ "base": "Request Alternatives",
995
+ "ISO": "directive"
996
+ },
997
+ "AFFIRM_INTENT": {
998
+ "base": "Affirm Intent",
999
+ "ISO": "answer"
1000
+ }
1001
+ }
1002
+ }
1003
+
1004
+
1005
+ class DAISOConfig(datasets.BuilderConfig):
1006
+ """BuilderConfig for DAISO."""
1007
+
1008
+ def __init__(self, label_classes, features, speakers, data_url, citation, url, **kwargs):
1009
+ """BuilderConfig for DAISO.
1010
+ Args:
1011
+ features: `list[string]`, list of the features that will appear in the
1012
+ feature dict. Should not include "label".
1013
+ data_url: `string`, url to download the csv file from.
1014
+ citation: `string`, citation for the data set.
1015
+ url: `string`, url for information about the data set.
1016
+ label_classes: `list[string]`, the list of classes for the label if the
1017
+ label is present as a string. Non-string labels will be cast to either
1018
+ 'False' or 'True'.
1019
+ **kwargs: keyword arguments forwarded to super.
1020
+ """
1021
+ super(DAISOConfig, self).__init__(version=_VERSION, **kwargs)
1022
+ self.label_classes = label_classes
1023
+ self.features = features
1024
+ self.speakers = speakers
1025
+ self.data_url = data_url
1026
+ self.citation = citation
1027
+ self.url = url
1028
+
1029
+
1030
+ # TODO: Name of the dataset usually matches the script name with CamelCase instead of snake_case
1031
+ class DAISO(datasets.GeneratorBasedBuilder):
1032
+ """TODO: Short description of my dataset."""
1033
+
1034
+ # This is an example of a dataset with multiple configurations.
1035
+ # If you don't want/need to define several sub-sets in your dataset,
1036
+ # just remove the BUILDER_CONFIG_CLASS and the BUILDER_CONFIGS attributes.
1037
+
1038
+ # If you need to make complex sub-parts in the datasets with configurable options
1039
+ # You can create your own builder configuration class to store attribute, inheriting from datasets.BuilderConfig
1040
+ # BUILDER_CONFIG_CLASS = MyBuilderConfig
1041
+
1042
+ # You will be able to load one or the other configurations in the following list with
1043
+ # data = datasets.load_dataset('my_dataset', 'first_domain')
1044
+ # data = datasets.load_dataset('my_dataset', 'second_domain')
1045
+ BUILDER_CONFIGS = [
1046
+ DAISOConfig(
1047
+ name="ami",
1048
+ description=textwrap.dedent(
1049
+ """\
1050
+ """
1051
+ ),
1052
+ label_classes=LABELS_MAPPING["ami"],
1053
+ speakers=['A', 'B', 'D', 'C'],
1054
+ features=[
1055
+ "Utterance",
1056
+ "Dialogue_Act",
1057
+ "Speaker",
1058
+ "Dialogue_Id",
1059
+ "Dialogue_Act_ISO"
1060
+ ],
1061
+ data_url={
1062
+ "train": _URL + "/ami/train.csv",
1063
+ "test": _URL + "/ami/test.csv",
1064
+ },
1065
+ citation=textwrap.dedent(
1066
+ """\
1067
+ @article{carletta2006ami,
1068
+ author = "Carletta, J.",
1069
+ title = "Announcing the AMI Meeting Corpus",
1070
+ journal = "The ELRA Newsletter",
1071
+ volume = "11",
1072
+ number = "1",
1073
+ year = "2006",
1074
+ pages = "3-5",
1075
+ month = "January-March"
1076
+ }"""
1077
+ ),
1078
+ url="https://groups.inf.ed.ac.uk/ami/corpus/",
1079
+ ),
1080
+ DAISOConfig(
1081
+ name="oasis",
1082
+ description=textwrap.dedent(
1083
+ """\
1084
+ """
1085
+ ),
1086
+ label_classes=LABELS_MAPPING["oasis"],
1087
+ speakers=['b', 'a'],
1088
+ features=[
1089
+ "Speaker",
1090
+ "Utterance",
1091
+ "Dialogue_Act",
1092
+ "Dialogue_Id",
1093
+ "Dialogue_Act_ISO"
1094
+ ],
1095
+ data_url={
1096
+ "train": _URL + "/oasis/train.csv",
1097
+ "dev": _URL + "/oasis/dev.csv",
1098
+ "test": _URL + "/oasis/test.csv",
1099
+ },
1100
+ citation=textwrap.dedent(
1101
+ """\
1102
+ @inproceedings{leech2003generic,
1103
+ title={Generic speech act annotation for task-oriented dialogues},
1104
+ author={Leech, Geoffrey and Weisser, Martin},
1105
+ booktitle={Proceedings of the corpus linguistics 2003 conference},
1106
+ volume={16},
1107
+ pages={441--446},
1108
+ year={2003},
1109
+ organization={Lancaster: Lancaster University}
1110
+ }"""
1111
+ ),
1112
+ url="http://groups.inf.ed.ac.uk/oasis/",
1113
+ ),
1114
+ DAISOConfig(
1115
+ name="maptask",
1116
+ description=textwrap.dedent(
1117
+ """\
1118
+ """
1119
+ ),
1120
+ label_classes=LABELS_MAPPING["maptask"],
1121
+ speakers=['g', 'f'],
1122
+ features=[
1123
+ "Speaker",
1124
+ "Utterance",
1125
+ "Dialogue_Act",
1126
+ "Dialogue_Id",
1127
+ "Dialogue_Act_ISO"
1128
+ ],
1129
+ data_url={
1130
+ "train": _URL + "/maptask/train.csv",
1131
+ "dev": _URL + "/maptask/dev.csv",
1132
+ "test": _URL + "/maptask/test.csv",
1133
+ },
1134
+ citation=textwrap.dedent(
1135
+ """\
1136
+ @inproceedings{thompson1993hcrc,
1137
+ title={The HCRC map task corpus: natural dialogue for speech recognition},
1138
+ author={Thompson, Henry S and Anderson, Anne H and Bard, Ellen Gurman and Doherty-Sneddon,
1139
+ Gwyneth and Newlands, Alison and Sotillo, Cathy},
1140
+ booktitle={HUMAN LANGUAGE TECHNOLOGY: Proceedings of a Workshop Held at Plainsboro, New Jersey, March 21-24, 1993},
1141
+ year={1993}
1142
+ }"""
1143
+ ),
1144
+ url="http://groups.inf.ed.ac.uk/maptask/",
1145
+ ),
1146
+ DAISOConfig(
1147
+ name="mrda",
1148
+ description=textwrap.dedent(
1149
+ """\
1150
+ """
1151
+ ),
1152
+ label_classes=LABELS_MAPPING["mrda"],
1153
+ speakers=['me003', 'me012', 'fe004', 'mn015', 'me010', 'me045', 'mn036', 'me013', 'me001', 'me011', 'mn005',
1154
+ 'fe016', 'fe008', 'mn017', 'me018', 'mn014', 'mn009', 'me026', 'me051', 'mn007', 'me034', 'me006',
1155
+ 'fn002', 'mn058', 'mn052', 'fe046', 'fn050', 'me025', 'mn048', 'mn047', 'mn059', 'me022', 'me028',
1156
+ 'mn082', 'mn021', 'fn083', 'mn030', 'mn081', 'mn035', 'mn040', 'mn049', 'me055', 'mn038', 'me056',
1157
+ 'mn057', 'fe068', 'fe069', 'fe066', 'me070', 'fe067', 'fe041', 'fn043'],
1158
+ features=[
1159
+ "Speaker",
1160
+ "Utterance",
1161
+ "Basic_DA",
1162
+ "General_DA",
1163
+ "Dialogue_Act",
1164
+ "Dialogue_Id",
1165
+ "Dialogue_Act_ISO"
1166
+ ],
1167
+ data_url={
1168
+ "train": _URL + "/mrda/train.csv",
1169
+ "dev": _URL + "/mrda/dev.csv",
1170
+ "test": _URL + "/mrda/test.csv",
1171
+ },
1172
+ citation=textwrap.dedent(
1173
+ """\
1174
+ @techreport{shriberg2004icsi,
1175
+ title={The ICSI meeting recorder dialog act (MRDA) corpus},
1176
+ author={Shriberg, Elizabeth and Dhillon, Raj and Bhagat, Sonali and Ang, Jeremy and Carvey, Hannah},
1177
+ year={2004},
1178
+ institution={INTERNATIONAL COMPUTER SCIENCE INST BERKELEY CA}
1179
+ }"""
1180
+ ),
1181
+ url="https://www.aclweb.org/anthology/W04-2319",
1182
+ ),
1183
+ DAISOConfig(
1184
+ name="swda",
1185
+ description=textwrap.dedent(
1186
+ """\
1187
+ Switchboard Dialogue Act Corpus.
1188
+ Grouping procedure is different from original recommendations.
1189
+ Contains detailed split for specific labels for ISO mapping.
1190
+ """
1191
+ ),
1192
+ label_classes=LABELS_MAPPING["swda"],
1193
+ speakers=['A', 'B'],
1194
+ features=[
1195
+ "Speaker",
1196
+ "Utterance",
1197
+ "Dialogue_Act",
1198
+ "Dialogue_Id",
1199
+ "Dialogue_Act_ISO"
1200
+ ],
1201
+ data_url={
1202
+ "train": _URL + "/swda/train.csv",
1203
+ "dev": _URL + "/swda/dev.csv",
1204
+ "test": _URL + "/swda/test.csv",
1205
+ },
1206
+ citation=textwrap.dedent(
1207
+ """\
1208
+ @article{stolcke2000dialogue,
1209
+ title={Dialogue act modeling for automatic tagging and recognition of conversational speech},
1210
+ author={Stolcke, Andreas and Ries, Klaus and Coccaro, Noah and Shriberg, Elizabeth and
1211
+ Bates, Rebecca and Jurafsky, Daniel and Taylor, Paul and Martin, Rachel and Ess-Dykema,
1212
+ Carol Van and Meteer, Marie},
1213
+ journal={Computational linguistics},
1214
+ volume={26},
1215
+ number={3},
1216
+ pages={339--373},
1217
+ year={2000},
1218
+ publisher={MIT Press}
1219
+ }"""
1220
+ ),
1221
+ url="https://web.stanford.edu/~jurafsky/ws97/",
1222
+ ),
1223
+ DAISOConfig(
1224
+ name="frames",
1225
+ description=textwrap.dedent(
1226
+ """\
1227
+ """
1228
+ ),
1229
+ label_classes=LABELS_MAPPING["frames"],
1230
+ features=[
1231
+ "Speaker",
1232
+ "Utterance",
1233
+ "Dialogue_Act",
1234
+ "Dialogue_Id",
1235
+ "Dialogue_Act_ISO"
1236
+ ],
1237
+ speakers=['USR', 'SYS'],
1238
+ data_url={
1239
+ "train": _URL + "/frames/train.csv",
1240
+ "test": _URL + "/frames/test.csv",
1241
+ },
1242
+ citation=textwrap.dedent(
1243
+ """\
1244
+ @inproceedings{el-asri-etal-2017-frames,
1245
+ title = "{F}rames: a corpus for adding memory to goal-oriented dialogue systems",
1246
+ author = "El Asri, Layla and
1247
+ Schulz, Hannes and
1248
+ Sharma, Shikhar and
1249
+ Zumer, Jeremie and
1250
+ Harris, Justin and
1251
+ Fine, Emery and
1252
+ Mehrotra, Rahul and
1253
+ Suleman, Kaheer",
1254
+ booktitle = "Proceedings of the 18th Annual {SIG}dial Meeting on Discourse and Dialogue",
1255
+ month = aug,
1256
+ year = "2017",
1257
+ address = {Saarbr{\"u}cken, Germany},
1258
+ publisher = "Association for Computational Linguistics",
1259
+ url = "https://aclanthology.org/W17-5526",
1260
+ doi = "10.18653/v1/W17-5526",
1261
+ pages = "207--219",
1262
+ abstract = "This paper proposes a new dataset, Frames, composed of 1369 human-human dialogues with an average of 15 turns per dialogue. This corpus contains goal-oriented dialogues between users who are given some constraints to book a trip and assistants who search a database to find appropriate trips. The users exhibit complex decision-making behaviour which involve comparing trips, exploring different options, and selecting among the trips that were discussed during the dialogue. To drive research on dialogue systems towards handling such behaviour, we have annotated and released the dataset and we propose in this paper a task called frame tracking. This task consists of keeping track of different semantic frames throughout each dialogue. We propose a rule-based baseline and analyse the frame tracking task through this baseline.",
1263
+ }"""
1264
+ ),
1265
+ url="http://datasets.maluuba.com/Frames",
1266
+ ),
1267
+ DAISOConfig(
1268
+ name="dyda",
1269
+ description=textwrap.dedent(
1270
+ """\
1271
+ """
1272
+ ),
1273
+ label_classes=LABELS_MAPPING["dyda"],
1274
+ # {"commissive": {
1275
+ # "base": "Commissive",
1276
+ # "ISO": "commissive"
1277
+ # },
1278
+ # "directive": {
1279
+ # "base": "Directive",
1280
+ # "ISO": "directive"
1281
+ # },
1282
+ # "inform": {
1283
+ # "base": "Inform",
1284
+ # "ISO": "inform"
1285
+ # },
1286
+ # "question": {
1287
+ # "base": "Question",
1288
+ # "ISO": None
1289
+ # }
1290
+ # },
1291
+ features=[
1292
+ "Speaker",
1293
+ "Utterance",
1294
+ "Dialogue_Act",
1295
+ "Emotion",
1296
+ "Dialogue_Id",
1297
+ "Dialogue_Act_ISO"
1298
+ ],
1299
+ speakers=["sp0", "sp1"],
1300
+ data_url={
1301
+ "train": _URL + "/dyda/train.csv",
1302
+ "dev": _URL + "/dyda/dev.csv",
1303
+ "test": _URL + "/dyda/test.csv",
1304
+ },
1305
+ citation=textwrap.dedent(
1306
+ """\
1307
+ @InProceedings{li2017dailydialog,
1308
+ author = {Li, Yanran and Su, Hui and Shen, Xiaoyu and Li, Wenjie and Cao, Ziqiang and Niu, Shuzi},
1309
+ title = {DailyDialog: A Manually Labelled Multi-turn Dialogue Dataset},
1310
+ booktitle = {Proceedings of The 8th International Joint Conference on Natural Language Processing (IJCNLP 2017)},
1311
+ year = {2017}
1312
+ }"""
1313
+ ),
1314
+ url="http://yanran.li/dailydialog.html",
1315
+ ),
1316
+ DAISOConfig(
1317
+ name="dstc3",
1318
+ description=textwrap.dedent(
1319
+ """\
1320
+ """
1321
+ ),
1322
+ label_classes=LABELS_MAPPING["dstc3"],
1323
+ features=[
1324
+ "Speaker",
1325
+ "Utterance",
1326
+ "Dialogue_Act",
1327
+ "Dialogue_Id",
1328
+ "Dialogue_Act_ISO"
1329
+ ],
1330
+ speakers=['SYS', 'USR'],
1331
+ data_url={
1332
+ "train": _URL + "/dstc3/train.csv",
1333
+ "test": _URL + "/dstc3/test.csv",
1334
+ },
1335
+ citation=textwrap.dedent(
1336
+ """\
1337
+ @article{Henderson2014TheTD,
1338
+ title={The third Dialog State Tracking Challenge},
1339
+ author={Matthew Henderson and Blaise Thomson and J. Williams},
1340
+ journal={2014 IEEE Spoken Language Technology Workshop (SLT)},
1341
+ year={2014},
1342
+ pages={324-329},
1343
+ url={https://api.semanticscholar.org/CorpusID:17478615}
1344
+ }"""
1345
+ ),
1346
+ url="http://camdial.org/~mh521/dstc/",
1347
+ ),
1348
+ DAISOConfig(
1349
+ name="dstc8-sgd",
1350
+ description=textwrap.dedent(
1351
+ """\
1352
+ """
1353
+ ),
1354
+ label_classes=LABELS_MAPPING["dstc8-sgd"],
1355
+ features=[
1356
+ "Speaker",
1357
+ "Utterance",
1358
+ "Dialogue_Act",
1359
+ "Dialogue_Id",
1360
+ "Dialogue_Act_ISO"
1361
+ ],
1362
+ speakers=['USER', 'SYSTEM'],
1363
+ data_url={
1364
+ "train": _URL + "/dstc8-sgd/train.csv",
1365
+ "dev": _URL + "/dstc8-sgd/dev.csv",
1366
+ "test": _URL + "/dstc8-sgd/test.csv",
1367
+ },
1368
+ citation=textwrap.dedent(
1369
+ """\
1370
+ @inproceedings{rastogi2020towards,
1371
+ title={Towards scalable multi-domain conversational agents: The schema-guided dialogue dataset},
1372
+ author={Rastogi, Abhinav and Zang, Xiaoxue and Sunkara, Srinivas and Gupta, Raghav and Khaitan, Pranav},
1373
+ booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
1374
+ volume={34},
1375
+ number={05},
1376
+ pages={8689--8696},
1377
+ year={2020}
1378
+ }"""
1379
+ ),
1380
+ url="https://github.com/google-research-datasets/dstc8-schema-guided-dialogue",
1381
+ ),
1382
+
1383
+ ]
1384
+
1385
+ DEFAULT_CONFIG_NAME = "dyda" # It's not mandatory to have a default configuration. Just use one if it make sense.
1386
+
1387
+ def _info(self):
1388
+ # TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
1389
+ features = {feature: datasets.Value("string") for feature in self.config.features}
1390
+ if self.config.label_classes:
1391
+
1392
+ labels = list(
1393
+ set(['OOD' if label == 'null' or label is None or label == 'None' or label == 'OOD' else label for label in
1394
+ list(self.config.label_classes.keys())]))
1395
+
1396
+ features["Label"] = datasets.features.ClassLabel(names = labels)
1397
+
1398
+ features["Label_ISO"] = datasets.features.ClassLabel(
1399
+ names=list(set([map.get("ISO", "OOD") for map in self.config.label_classes.values()])))
1400
+
1401
+ # Add the missing features
1402
+ features["Dialogue_Act_Base"] = datasets.Value("string")
1403
+ features["Label_Base"] = datasets.features.ClassLabel(
1404
+ names=list(set([self.config.label_classes.get(label,{}).get("base", "OOD") for label in labels])))
1405
+
1406
+ features["Idx"] = datasets.Value("int32")
1407
+ features["Speaker_Id"] = datasets.features.ClassLabel(names=self.config.speakers)
1408
+ # if self.config.name == "": # This is the name of the configuration selected in BUILDER_CONFIGS above
1409
+ # features = datasets.Features(
1410
+ # {
1411
+ # "sentence": datasets.Value("string"),
1412
+ # "option1": datasets.Value("string"),
1413
+ # "answer": datasets.Value("string")
1414
+ # # These are the features of your dataset like images, labels ...
1415
+ # }
1416
+ # )
1417
+ return datasets.DatasetInfo(
1418
+ # This is the description that will appear on the datasets page.
1419
+ description=_DAISO_DESCRIPTION,
1420
+ # This defines the different columns of the dataset and their types
1421
+ features=datasets.Features(features),
1422
+ # Here we define them above because they are different between the two configurations
1423
+ # Homepage of the dataset for documentation
1424
+ homepage=self.config.url,
1425
+ # License for the dataset if available
1426
+ # license=_LICENSE,
1427
+ # Citation for the dataset
1428
+ citation=self.config.citation + "\n" + _DAISO_CITATION,
1429
+ )
1430
+
1431
+ def _split_generators(self, dl_manager):
1432
+ # TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration
1433
+ # If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name
1434
+
1435
+ # dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS
1436
+ # 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.
1437
+ # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
1438
+ data_files = dl_manager.download(self.config.data_url)
1439
+ splits = []
1440
+ if "train" in data_files:
1441
+ splits.append(datasets.SplitGenerator(
1442
+ name=datasets.Split.TRAIN,
1443
+ # These kwargs will be passed to _generate_examples
1444
+ gen_kwargs={
1445
+ "file": data_files["train"],
1446
+ "split": "train",
1447
+ },
1448
+ ))
1449
+ if "dev" in data_files:
1450
+ splits.append(datasets.SplitGenerator(
1451
+ name=datasets.Split.VALIDATION,
1452
+ # These kwargs will be passed to _generate_examples
1453
+ gen_kwargs={
1454
+ "file": data_files["dev"],
1455
+ "split": "dev",
1456
+ },
1457
+ ))
1458
+ if "test" in data_files:
1459
+ splits.append(datasets.SplitGenerator(
1460
+ name=datasets.Split.TEST,
1461
+ # These kwargs will be passed to _generate_examples
1462
+ gen_kwargs={
1463
+ "file": data_files["test"],
1464
+ "split": "test"
1465
+ },
1466
+ ))
1467
+ return splits
1468
+
1469
+ # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
1470
+ def _generate_examples(self, file, split):
1471
+ # TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
1472
+ df = pd.read_csv(file, delimiter=",", quotechar='"', dtype=str)
1473
+ # df['Dialogue_Act'] = df['Dialogue_Act'].apply(lambda x: "OOD" if pd.isna(x) else x)
1474
+ # df['Dialogue_Act_ISO'] = df['Dialogue_Act_ISO'].apply(lambda x: "OOD" if pd.isna(x) else x)
1475
+ df['Dialogue_Act'] = df['Dialogue_Act'].apply(lambda x: "OOD" if x is None or x == 'None' or pd.isna(x) else x)
1476
+ df['Dialogue_Act_ISO'] = df['Dialogue_Act_ISO'].apply(lambda x: "OOD" if x is None or x == 'None' or pd.isna(x) else x)
1477
+ df['Dialogue_Act_Base'] = df['Dialogue_Act'].apply(lambda x: self.config.label_classes.get(x, {}).get("base", "OOD"))
1478
+
1479
+ rows = df.to_dict(orient="records")
1480
+
1481
+ for n, row in enumerate(rows):
1482
+ example = row
1483
+ example["Idx"] = n
1484
+
1485
+ if "Dialogue_Act" in example:
1486
+ label = example["Dialogue_Act"]
1487
+ example["Label"] = label
1488
+ example["Label_ISO"] = self.config.label_classes.get(label,{}).get("ISO","OOD")
1489
+ example["Label_Base"] = self.config.label_classes.get(label,{}).get("base","OOD")
1490
+
1491
+ if "Speaker" in example:
1492
+ speaker = example["Speaker"]
1493
+ example["Speaker_Id"] = speaker
1494
+
1495
+ yield example["Idx"], example