Datasets:
Charith Peris
commited on
Commit
•
e6c0d86
1
Parent(s):
ae3d13f
First commit based on qanastek/massive
Browse files- CITATION.cff +50 -0
- LICENSE +207 -0
- README.md +675 -0
- massive.py +417 -0
- test_massive.py +7 -0
CITATION.cff
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
cff-version: 1.0.0
|
2 |
+
message: "MASSIVE: A 1M-Example Multilingual Natural Language Understanding Dataset with 51 Typologically-Diverse Languages"
|
3 |
+
authors:
|
4 |
+
- family-names: "FitzGerald"
|
5 |
+
given-names: "Jack"
|
6 |
+
- family-names: "Hench"
|
7 |
+
given-names: "Christopher"
|
8 |
+
- family-names: "Peris"
|
9 |
+
given-names: "Charith"
|
10 |
+
- family-names: "Mackie"
|
11 |
+
given-names: "Scott"
|
12 |
+
- family-names: "Rottmann"
|
13 |
+
given-names: "Kay"
|
14 |
+
- family-names: "Sanchez"
|
15 |
+
given-names: "Ana"
|
16 |
+
- family-names: "Nash"
|
17 |
+
given-names: "Aaron"
|
18 |
+
- family-names: "Urbach"
|
19 |
+
given-names: "Liam"
|
20 |
+
- family-names: "Kakarala"
|
21 |
+
given-names: "Vishesh"
|
22 |
+
- family-names: "Singh"
|
23 |
+
given-names: "Richa"
|
24 |
+
- family-names: "Ranganath"
|
25 |
+
given-names: "Swetha"
|
26 |
+
- family-names: "Crist"
|
27 |
+
given-names: "Laurie"
|
28 |
+
- family-names: "Britan"
|
29 |
+
given-names: "Misha"
|
30 |
+
- family-names: "Leeuwis"
|
31 |
+
given-names: "Wouter"
|
32 |
+
- family-names: "Tur"
|
33 |
+
given-names: "Gokhan"
|
34 |
+
- family-names: "Natarajan"
|
35 |
+
given-names: "Prem"
|
36 |
+
title: "MASSIVE: A 1M-Example Multilingual Natural Language Understanding Dataset with 51 Typologically-Diverse Languages"
|
37 |
+
version: 1.0.0
|
38 |
+
date-released: 2022-04-18
|
39 |
+
url: "https://arxiv.org/abs/2204.08582"
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
+
|
44 |
+
|
45 |
+
|
46 |
+
|
47 |
+
|
48 |
+
|
49 |
+
|
50 |
+
|
LICENSE
ADDED
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Copyright Amazon.com Inc. or its affiliates.
|
2 |
+
|
3 |
+
Copyright and license details for the data and modified code can be found in NOTICE.md.
|
4 |
+
|
5 |
+
License for `massive` repo and code, Apache 2.0:
|
6 |
+
|
7 |
+
Apache License
|
8 |
+
Version 2.0, January 2004
|
9 |
+
http://www.apache.org/licenses/
|
10 |
+
|
11 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
12 |
+
|
13 |
+
1. Definitions.
|
14 |
+
|
15 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
16 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
17 |
+
|
18 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
19 |
+
the copyright owner that is granting the License.
|
20 |
+
|
21 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
22 |
+
other entities that control, are controlled by, or are under common
|
23 |
+
control with that entity. For the purposes of this definition,
|
24 |
+
"control" means (i) the power, direct or indirect, to cause the
|
25 |
+
direction or management of such entity, whether by contract or
|
26 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
27 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
28 |
+
|
29 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
30 |
+
exercising permissions granted by this License.
|
31 |
+
|
32 |
+
"Source" form shall mean the preferred form for making modifications,
|
33 |
+
including but not limited to software source code, documentation
|
34 |
+
source, and configuration files.
|
35 |
+
|
36 |
+
"Object" form shall mean any form resulting from mechanical
|
37 |
+
transformation or translation of a Source form, including but
|
38 |
+
not limited to compiled object code, generated documentation,
|
39 |
+
and conversions to other media types.
|
40 |
+
|
41 |
+
"Work" shall mean the work of authorship, whether in Source or
|
42 |
+
Object form, made available under the License, as indicated by a
|
43 |
+
copyright notice that is included in or attached to the work
|
44 |
+
(an example is provided in the Appendix below).
|
45 |
+
|
46 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
47 |
+
form, that is based on (or derived from) the Work and for which the
|
48 |
+
editorial revisions, annotations, elaborations, or other modifications
|
49 |
+
represent, as a whole, an original work of authorship. For the purposes
|
50 |
+
of this License, Derivative Works shall not include works that remain
|
51 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
52 |
+
the Work and Derivative Works thereof.
|
53 |
+
|
54 |
+
"Contribution" shall mean any work of authorship, including
|
55 |
+
the original version of the Work and any modifications or additions
|
56 |
+
to that Work or Derivative Works thereof, that is intentionally
|
57 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
58 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
59 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
60 |
+
means any form of electronic, verbal, or written communication sent
|
61 |
+
to the Licensor or its representatives, including but not limited to
|
62 |
+
communication on electronic mailing lists, source code control systems,
|
63 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
64 |
+
Licensor for the purpose of discussing and improving the Work, but
|
65 |
+
excluding communication that is conspicuously marked or otherwise
|
66 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
67 |
+
|
68 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
69 |
+
on behalf of whom a Contribution has been received by Licensor and
|
70 |
+
subsequently incorporated within the Work.
|
71 |
+
|
72 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
73 |
+
this License, each Contributor hereby grants to You a perpetual,
|
74 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
75 |
+
copyright license to reproduce, prepare Derivative Works of,
|
76 |
+
publicly display, publicly perform, sublicense, and distribute the
|
77 |
+
Work and such Derivative Works in Source or Object form.
|
78 |
+
|
79 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
80 |
+
this License, each Contributor hereby grants to You a perpetual,
|
81 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
82 |
+
(except as stated in this section) patent license to make, have made,
|
83 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
84 |
+
where such license applies only to those patent claims licensable
|
85 |
+
by such Contributor that are necessarily infringed by their
|
86 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
87 |
+
with the Work to which such Contribution(s) was submitted. If You
|
88 |
+
institute patent litigation against any entity (including a
|
89 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
90 |
+
or a Contribution incorporated within the Work constitutes direct
|
91 |
+
or contributory patent infringement, then any patent licenses
|
92 |
+
granted to You under this License for that Work shall terminate
|
93 |
+
as of the date such litigation is filed.
|
94 |
+
|
95 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
96 |
+
Work or Derivative Works thereof in any medium, with or without
|
97 |
+
modifications, and in Source or Object form, provided that You
|
98 |
+
meet the following conditions:
|
99 |
+
|
100 |
+
(a) You must give any other recipients of the Work or
|
101 |
+
Derivative Works a copy of this License; and
|
102 |
+
|
103 |
+
(b) You must cause any modified files to carry prominent notices
|
104 |
+
stating that You changed the files; and
|
105 |
+
|
106 |
+
(c) You must retain, in the Source form of any Derivative Works
|
107 |
+
that You distribute, all copyright, patent, trademark, and
|
108 |
+
attribution notices from the Source form of the Work,
|
109 |
+
excluding those notices that do not pertain to any part of
|
110 |
+
the Derivative Works; and
|
111 |
+
|
112 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
113 |
+
distribution, then any Derivative Works that You distribute must
|
114 |
+
include a readable copy of the attribution notices contained
|
115 |
+
within such NOTICE file, excluding those notices that do not
|
116 |
+
pertain to any part of the Derivative Works, in at least one
|
117 |
+
of the following places: within a NOTICE text file distributed
|
118 |
+
as part of the Derivative Works; within the Source form or
|
119 |
+
documentation, if provided along with the Derivative Works; or,
|
120 |
+
within a display generated by the Derivative Works, if and
|
121 |
+
wherever such third-party notices normally appear. The contents
|
122 |
+
of the NOTICE file are for informational purposes only and
|
123 |
+
do not modify the License. You may add Your own attribution
|
124 |
+
notices within Derivative Works that You distribute, alongside
|
125 |
+
or as an addendum to the NOTICE text from the Work, provided
|
126 |
+
that such additional attribution notices cannot be construed
|
127 |
+
as modifying the License.
|
128 |
+
|
129 |
+
You may add Your own copyright statement to Your modifications and
|
130 |
+
may provide additional or different license terms and conditions
|
131 |
+
for use, reproduction, or distribution of Your modifications, or
|
132 |
+
for any such Derivative Works as a whole, provided Your use,
|
133 |
+
reproduction, and distribution of the Work otherwise complies with
|
134 |
+
the conditions stated in this License.
|
135 |
+
|
136 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
137 |
+
any Contribution intentionally submitted for inclusion in the Work
|
138 |
+
by You to the Licensor shall be under the terms and conditions of
|
139 |
+
this License, without any additional terms or conditions.
|
140 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
141 |
+
the terms of any separate license agreement you may have executed
|
142 |
+
with Licensor regarding such Contributions.
|
143 |
+
|
144 |
+
6. Trademarks. This License does not grant permission to use the trade
|
145 |
+
names, trademarks, service marks, or product names of the Licensor,
|
146 |
+
except as required for reasonable and customary use in describing the
|
147 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
148 |
+
|
149 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
150 |
+
agreed to in writing, Licensor provides the Work (and each
|
151 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
152 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
153 |
+
implied, including, without limitation, any warranties or conditions
|
154 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
155 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
156 |
+
appropriateness of using or redistributing the Work and assume any
|
157 |
+
risks associated with Your exercise of permissions under this License.
|
158 |
+
|
159 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
160 |
+
whether in tort (including negligence), contract, or otherwise,
|
161 |
+
unless required by applicable law (such as deliberate and grossly
|
162 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
163 |
+
liable to You for damages, including any direct, indirect, special,
|
164 |
+
incidental, or consequential damages of any character arising as a
|
165 |
+
result of this License or out of the use or inability to use the
|
166 |
+
Work (including but not limited to damages for loss of goodwill,
|
167 |
+
work stoppage, computer failure or malfunction, or any and all
|
168 |
+
other commercial damages or losses), even if such Contributor
|
169 |
+
has been advised of the possibility of such damages.
|
170 |
+
|
171 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
172 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
173 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
174 |
+
or other liability obligations and/or rights consistent with this
|
175 |
+
License. However, in accepting such obligations, You may act only
|
176 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
177 |
+
of any other Contributor, and only if You agree to indemnify,
|
178 |
+
defend, and hold each Contributor harmless for any liability
|
179 |
+
incurred by, or claims asserted against, such Contributor by reason
|
180 |
+
of your accepting any such warranty or additional liability.
|
181 |
+
|
182 |
+
END OF TERMS AND CONDITIONS
|
183 |
+
|
184 |
+
APPENDIX: How to apply the Apache License to your work.
|
185 |
+
|
186 |
+
To apply the Apache License to your work, attach the following
|
187 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
188 |
+
replaced with your own identifying information. (Don't include
|
189 |
+
the brackets!) The text should be enclosed in the appropriate
|
190 |
+
comment syntax for the file format. We also recommend that a
|
191 |
+
file or class name and description of purpose be included on the
|
192 |
+
same "printed page" as the copyright notice for easier
|
193 |
+
identification within third-party archives.
|
194 |
+
|
195 |
+
Copyright [yyyy] [name of copyright owner]
|
196 |
+
|
197 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
198 |
+
you may not use this file except in compliance with the License.
|
199 |
+
You may obtain a copy of the License at
|
200 |
+
|
201 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
202 |
+
|
203 |
+
Unless required by applicable law or agreed to in writing, software
|
204 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
205 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
206 |
+
See the License for the specific language governing permissions and
|
207 |
+
limitations under the License.
|
README.md
ADDED
@@ -0,0 +1,675 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- expert-generated
|
4 |
+
language_creators:
|
5 |
+
- found
|
6 |
+
languages:
|
7 |
+
- af-ZA
|
8 |
+
- am-ET
|
9 |
+
- ar-SA
|
10 |
+
- az-AZ
|
11 |
+
- bn-BD
|
12 |
+
- cy-GB
|
13 |
+
- da-DK
|
14 |
+
- de-DE
|
15 |
+
- el-GR
|
16 |
+
- en-US
|
17 |
+
- es-ES
|
18 |
+
- fa-IR
|
19 |
+
- fi-FI
|
20 |
+
- fr-FR
|
21 |
+
- he-IL
|
22 |
+
- hi-IN
|
23 |
+
- hu-HU
|
24 |
+
- hy-AM
|
25 |
+
- id-ID
|
26 |
+
- is-IS
|
27 |
+
- it-IT
|
28 |
+
- ja-JP
|
29 |
+
- jv-ID
|
30 |
+
- ka-GE
|
31 |
+
- km-KH
|
32 |
+
- kn-IN
|
33 |
+
- ko-KR
|
34 |
+
- lv-LV
|
35 |
+
- ml-IN
|
36 |
+
- mn-MN
|
37 |
+
- ms-MY
|
38 |
+
- my-MM
|
39 |
+
- nb-NO
|
40 |
+
- nl-NL
|
41 |
+
- pl-PL
|
42 |
+
- pt-PT
|
43 |
+
- ro-RO
|
44 |
+
- ru-RU
|
45 |
+
- sl-SL
|
46 |
+
- sq-AL
|
47 |
+
- sv-SE
|
48 |
+
- sw-KE
|
49 |
+
- ta-IN
|
50 |
+
- te-IN
|
51 |
+
- th-TH
|
52 |
+
- tl-PH
|
53 |
+
- tr-TR
|
54 |
+
- ur-PK
|
55 |
+
- vi-VN
|
56 |
+
- zh-CN
|
57 |
+
- zh-TW
|
58 |
+
licenses:
|
59 |
+
- apache-2.0
|
60 |
+
multilinguality:
|
61 |
+
- af-ZA
|
62 |
+
- am-ET
|
63 |
+
- ar-SA
|
64 |
+
- az-AZ
|
65 |
+
- bn-BD
|
66 |
+
- cy-GB
|
67 |
+
- da-DK
|
68 |
+
- de-DE
|
69 |
+
- el-GR
|
70 |
+
- en-US
|
71 |
+
- es-ES
|
72 |
+
- fa-IR
|
73 |
+
- fi-FI
|
74 |
+
- fr-FR
|
75 |
+
- he-IL
|
76 |
+
- hi-IN
|
77 |
+
- hu-HU
|
78 |
+
- hy-AM
|
79 |
+
- id-ID
|
80 |
+
- is-IS
|
81 |
+
- it-IT
|
82 |
+
- ja-JP
|
83 |
+
- jv-ID
|
84 |
+
- ka-GE
|
85 |
+
- km-KH
|
86 |
+
- kn-IN
|
87 |
+
- ko-KR
|
88 |
+
- lv-LV
|
89 |
+
- ml-IN
|
90 |
+
- mn-MN
|
91 |
+
- ms-MY
|
92 |
+
- my-MM
|
93 |
+
- nb-NO
|
94 |
+
- nl-NL
|
95 |
+
- pl-PL
|
96 |
+
- pt-PT
|
97 |
+
- ro-RO
|
98 |
+
- ru-RU
|
99 |
+
- sl-SL
|
100 |
+
- sq-AL
|
101 |
+
- sv-SE
|
102 |
+
- sw-KE
|
103 |
+
- ta-IN
|
104 |
+
- te-IN
|
105 |
+
- th-TH
|
106 |
+
- tl-PH
|
107 |
+
- tr-TR
|
108 |
+
- ur-PK
|
109 |
+
- vi-VN
|
110 |
+
- zh-CN
|
111 |
+
- zh-TW
|
112 |
+
pretty_name: MASSIVE
|
113 |
+
size_categories:
|
114 |
+
- 100K<n<1M
|
115 |
+
source_datasets:
|
116 |
+
- original
|
117 |
+
task_categories:
|
118 |
+
- text-classification
|
119 |
+
task_ids:
|
120 |
+
- intent-classification
|
121 |
+
- multi-class-classification
|
122 |
+
- natural-language-understanding
|
123 |
+
---
|
124 |
+
|
125 |
+
# MASSIVE: A 1M-Example Multilingual Natural Language Understanding Dataset with 51 Typologically-Diverse Languages
|
126 |
+
|
127 |
+
## Table of Contents
|
128 |
+
- [Dataset Card for [Needs More Information]](#dataset-card-for-needs-more-information)
|
129 |
+
- [Table of Contents](#table-of-contents)
|
130 |
+
- [Dataset Description](#dataset-description)
|
131 |
+
- [Dataset Summary](#dataset-summary)
|
132 |
+
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
133 |
+
- [Languages](#languages)
|
134 |
+
- [Dataset Structure](#dataset-structure)
|
135 |
+
- [Data Instances](#data-instances)
|
136 |
+
- [Data Fields](#data-fields)
|
137 |
+
- [Data Splits](#data-splits)
|
138 |
+
- [Dataset Creation](#dataset-creation)
|
139 |
+
- [Curation Rationale](#curation-rationale)
|
140 |
+
- [Source Data](#source-data)
|
141 |
+
- [Initial Data Collection and Normalization](#initial-data-collection-and-normalization)
|
142 |
+
- [Who are the source language producers?](#who-are-the-source-language-producers)
|
143 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
144 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
145 |
+
- [Other Known Limitations](#other-known-limitations)
|
146 |
+
- [Additional Information](#additional-information)
|
147 |
+
- [Dataset Curators](#dataset-curators)
|
148 |
+
- [Licensing Information](#licensing-information)
|
149 |
+
- [No Warranty](#no-warranty)
|
150 |
+
- [Citation Information](#citation-information)
|
151 |
+
|
152 |
+
## Dataset Description
|
153 |
+
|
154 |
+
- **Homepage:** https://github.com/alexa/massive
|
155 |
+
- **Repository:** https://github.com/alexa/massive
|
156 |
+
- **Paper:** https://arxiv.org/abs/2204.08582
|
157 |
+
- **Leaderboard:** https://eval.ai/web/challenges/challenge-page/1697/overview
|
158 |
+
- **Point of Contact:** [GitHub](https://github.com/alexa/massive/issues)
|
159 |
+
|
160 |
+
### Dataset Summary
|
161 |
+
|
162 |
+
MASSIVE is a parallel dataset of > 1M utterances across 51 languages with annotations for the Natural Language Understanding tasks of intent prediction and slot annotation. Utterances span 60 intents and include 55 slot types. MASSIVE was created by localizing the SLURP dataset, composed of general Intelligent Voice Assistant single-shot interactions.
|
163 |
+
|
164 |
+
| Name | Lang | Utt/Lang | Domains | Intents | Slots |
|
165 |
+
|:-------------------------------------------------------------------------------:|:-------:|:--------------:|:-------:|:--------:|:------:|
|
166 |
+
| MASSIVE | 51 | 19,521 | 18 | 60 | 55 |
|
167 |
+
| SLURP (Bastianelli et al., 2020) | 1 | 16,521 | 18 | 60 | 55 |
|
168 |
+
| NLU Evaluation Data (Liu et al., 2019) | 1 | 25,716 | 18 | 54 | 56 |
|
169 |
+
| Airline Travel Information System (ATIS) (Price, 1990) | 1 | 5,871 | 1 | 26 | 129 |
|
170 |
+
| ATIS with Hindi and Turkish (Upadhyay et al., 2018) | 3 | 1,315-5,871 | 1 | 26 | 129 |
|
171 |
+
| MultiATIS++ (Xu et al., 2020) | 9 | 1,422-5,897 | 1 | 21-26 | 99-140 |
|
172 |
+
| Snips (Coucke et al., 2018) | 1 | 14,484 | - | 7 | 53 |
|
173 |
+
| Snips with French (Saade et al., 2019) | 2 | 4,818 | 2 | 14-15 | 11-12 |
|
174 |
+
| Task Oriented Parsing (TOP) (Gupta et al., 2018) | 1 | 44,873 | 2 | 25 | 36 |
|
175 |
+
| Multilingual Task-Oriented Semantic Parsing (MTOP) (Li et al., 2021) | 6 | 15,195-22,288 | 11 | 104-113 | 72-75 |
|
176 |
+
| Cross-Lingual Multilingual Task Oriented Dialog (Schuster et al., 2019) | 3 | 5,083-43,323 | 3 | 12 | 11 |
|
177 |
+
| Microsoft Dialog Challenge (Li et al., 2018) | 1 | 38,276 | 3 | 11 | 29 |
|
178 |
+
| Fluent Speech Commands (FSC) (Lugosch et al., 2019) | 1 | 30,043 | - | 31 | - |
|
179 |
+
| Chinese Audio-Textual Spoken Language Understanding (CATSLU) (Zhu et al., 2019) | 1 | 16,258 | 4 | - | 94 |
|
180 |
+
|
181 |
+
### Supported Tasks and Leaderboards
|
182 |
+
|
183 |
+
The dataset can be used to train a model for `natural-language-understanding` (NLU) :
|
184 |
+
|
185 |
+
- `intent-classification`
|
186 |
+
- `multi-class-classification`
|
187 |
+
- `natural-language-understanding`
|
188 |
+
|
189 |
+
### Languages
|
190 |
+
|
191 |
+
The corpora consists of parallel sentences from 51 languages :
|
192 |
+
|
193 |
+
- `Afrikaans - South Africa (af-ZA)`
|
194 |
+
- `Amharic - Ethiopia (am-ET)`
|
195 |
+
- `Arabic - Saudi Arabia (ar-SA)`
|
196 |
+
- `Azeri - Azerbaijan (az-AZ)`
|
197 |
+
- `Bengali - Bangladesh (bn-BD)`
|
198 |
+
- `Chinese - China (zh-CN)`
|
199 |
+
- `Chinese - Taiwan (zh-TW)`
|
200 |
+
- `Danish - Denmark (da-DK)`
|
201 |
+
- `German - Germany (de-DE)`
|
202 |
+
- `Greek - Greece (el-GR)`
|
203 |
+
- `English - United States (en-US)`
|
204 |
+
- `Spanish - Spain (es-ES)`
|
205 |
+
- `Farsi - Iran (fa-IR)`
|
206 |
+
- `Finnish - Finland (fi-FI)`
|
207 |
+
- `French - France (fr-FR)`
|
208 |
+
- `Hebrew - Israel (he-IL)`
|
209 |
+
- `Hungarian - Hungary (hu-HU)`
|
210 |
+
- `Armenian - Armenia (hy-AM)`
|
211 |
+
- `Indonesian - Indonesia (id-ID)`
|
212 |
+
- `Icelandic - Iceland (is-IS)`
|
213 |
+
- `Italian - Italy (it-IT)`
|
214 |
+
- `Japanese - Japan (ja-JP)`
|
215 |
+
- `Javanese - Indonesia (jv-ID)`
|
216 |
+
- `Georgian - Georgia (ka-GE)`
|
217 |
+
- `Khmer - Cambodia (km-KH)`
|
218 |
+
- `Korean - Korea (ko-KR)`
|
219 |
+
- `Latvian - Latvia (lv-LV)`
|
220 |
+
- `Mongolian - Mongolia (mn-MN)`
|
221 |
+
- `Malay - Malaysia (ms-MY)`
|
222 |
+
- `Burmese - Myanmar (my-MM)`
|
223 |
+
- `Norwegian - Norway (nb-NO)`
|
224 |
+
- `Dutch - Netherlands (nl-NL)`
|
225 |
+
- `Polish - Poland (pl-PL)`
|
226 |
+
- `Portuguese - Portugal (pt-PT)`
|
227 |
+
- `Romanian - Romania (ro-RO)`
|
228 |
+
- `Russian - Russia (ru-RU)`
|
229 |
+
- `Slovanian - Slovania (sl-SL)`
|
230 |
+
- `Albanian - Albania (sq-AL)`
|
231 |
+
- `Swedish - Sweden (sv-SE)`
|
232 |
+
- `Swahili - Kenya (sw-KE)`
|
233 |
+
- `Hindi - India (hi-IN)`
|
234 |
+
- `Kannada - India (kn-IN)`
|
235 |
+
- `Malayalam - India (ml-IN)`
|
236 |
+
- `Tamil - India (ta-IN)`
|
237 |
+
- `Telugu - India (te-IN)`
|
238 |
+
- `Thai - Thailand (th-TH)`
|
239 |
+
- `Tagalog - Philippines (tl-PH)`
|
240 |
+
- `Turkish - Turkey (tr-TR)`
|
241 |
+
- `Urdu - Pakistan (ur-PK)`
|
242 |
+
- `Vietnamese - Vietnam (vi-VN)`
|
243 |
+
- `Welsh - United Kingdom (cy-GB)`
|
244 |
+
|
245 |
+
## Load the dataset with HuggingFace
|
246 |
+
|
247 |
+
```python
|
248 |
+
from datasets import load_dataset
|
249 |
+
dataset = load_dataset("AmazonScience/MASSIVE", "en-US", split='train')
|
250 |
+
print(dataset[0])
|
251 |
+
```
|
252 |
+
|
253 |
+
## Dataset Structure
|
254 |
+
|
255 |
+
### Data Instances
|
256 |
+
|
257 |
+
```json
|
258 |
+
{
|
259 |
+
"id": "0",
|
260 |
+
"locale": "fr-FR",
|
261 |
+
"partition": "test",
|
262 |
+
"scenario": "alarm",
|
263 |
+
"intent": "alarm_set",
|
264 |
+
"utt": "réveille-moi à cinq heures du matin cette semaine",
|
265 |
+
"annot_utt": "réveille-moi à [time : cinq heures du matin] [date : cette semaine]",
|
266 |
+
"worker_id": "22",
|
267 |
+
"slot_method": [
|
268 |
+
{ "slot": "time", "method": "translation" },
|
269 |
+
{ "slot": "date", "method": "translation" }
|
270 |
+
],
|
271 |
+
"judgments": [
|
272 |
+
{
|
273 |
+
"worker_id": "22",
|
274 |
+
"intent_score": 1,
|
275 |
+
"slots_score": 1,
|
276 |
+
"grammar_score": 4,
|
277 |
+
"spelling_score": 2,
|
278 |
+
"language_identification": "target"
|
279 |
+
},
|
280 |
+
{
|
281 |
+
"worker_id": "8",
|
282 |
+
"intent_score": 1,
|
283 |
+
"slots_score": 1,
|
284 |
+
"grammar_score": 4,
|
285 |
+
"spelling_score": 2,
|
286 |
+
"language_identification": "target"
|
287 |
+
},
|
288 |
+
{
|
289 |
+
"worker_id": "0",
|
290 |
+
"intent_score": 1,
|
291 |
+
"slots_score": 1,
|
292 |
+
"grammar_score": 4,
|
293 |
+
"spelling_score": 2,
|
294 |
+
"language_identification": "target"
|
295 |
+
}
|
296 |
+
]
|
297 |
+
}
|
298 |
+
```
|
299 |
+
|
300 |
+
### Data Fields
|
301 |
+
|
302 |
+
`id`: maps to the original ID in the [SLURP](https://github.com/pswietojanski/slurp) collection. Mapping back to the SLURP en-US utterance, this utterance served as the basis for this localization.
|
303 |
+
|
304 |
+
`locale`: is the language and country code accoring to ISO-639-1 and ISO-3166.
|
305 |
+
|
306 |
+
`partition`: is either `train`, `dev`, or `test`, according to the original split in [SLURP](https://github.com/pswietojanski/slurp).
|
307 |
+
|
308 |
+
`scenario`: is the general domain, aka "scenario" in SLURP terminology, of an utterance
|
309 |
+
|
310 |
+
`intent`: is the specific intent of an utterance within a domain formatted as `{scenario}_{intent}`
|
311 |
+
|
312 |
+
`utt`: the raw utterance text without annotations
|
313 |
+
|
314 |
+
`annot_utt`: the text from `utt` with slot annotations formatted as `[{label} : {entity}]`
|
315 |
+
|
316 |
+
`worker_id`: The obfuscated worker ID from MTurk of the worker completing the localization of the utterance. Worker IDs are specific to a locale and do *not* map across locales.
|
317 |
+
|
318 |
+
`slot_method`: for each slot in the utterance, whether that slot was a `translation` (i.e., same expression just in the target language), `localization` (i.e., not the same expression but a different expression was chosen more suitable to the phrase in that locale), or `unchanged` (i.e., the original en-US slot value was copied over without modification).
|
319 |
+
|
320 |
+
`judgments`: Each judgment collected for the localized utterance has 6 keys. `worker_id` is the obfuscated worker ID from MTurk of the worker completing the judgment. Worker IDs are specific to a locale and do *not* map across locales, but *are* consistent across the localization tasks and the judgment tasks, e.g., judgment worker ID 32 in the example above may appear as the localization worker ID for the localization of a different de-DE utterance, in which case it would be the same worker.
|
321 |
+
|
322 |
+
```plain
|
323 |
+
intent_score : "Does the sentence match the intent?"
|
324 |
+
0: No
|
325 |
+
1: Yes
|
326 |
+
2: It is a reasonable interpretation of the goal
|
327 |
+
|
328 |
+
slots_score : "Do all these terms match the categories in square brackets?"
|
329 |
+
0: No
|
330 |
+
1: Yes
|
331 |
+
2: There are no words in square brackets (utterance without a slot)
|
332 |
+
|
333 |
+
grammar_score : "Read the sentence out loud. Ignore any spelling, punctuation, or capitalization errors. Does it sound natural?"
|
334 |
+
0: Completely unnatural (nonsensical, cannot be understood at all)
|
335 |
+
1: Severe errors (the meaning cannot be understood and doesn't sound natural in your language)
|
336 |
+
2: Some errors (the meaning can be understood but it doesn't sound natural in your language)
|
337 |
+
3: Good enough (easily understood and sounds almost natural in your language)
|
338 |
+
4: Perfect (sounds natural in your language)
|
339 |
+
|
340 |
+
spelling_score : "Are all words spelled correctly? Ignore any spelling variances that may be due to differences in dialect. Missing spaces should be marked as a spelling error."
|
341 |
+
0: There are more than 2 spelling errors
|
342 |
+
1: There are 1-2 spelling errors
|
343 |
+
2: All words are spelled correctly
|
344 |
+
|
345 |
+
language_identification : "The following sentence contains words in the following languages (check all that apply)"
|
346 |
+
1: target
|
347 |
+
2: english
|
348 |
+
3: other
|
349 |
+
4: target & english
|
350 |
+
5: target & other
|
351 |
+
6: english & other
|
352 |
+
7: target & english & other
|
353 |
+
```
|
354 |
+
|
355 |
+
### Data Splits
|
356 |
+
|
357 |
+
|Language|Train|Dev|Test|
|
358 |
+
|:---:|:---:|:---:|:---:|
|
359 |
+
|af-ZA|11514|2033|2974|
|
360 |
+
|am-ET|11514|2033|2974|
|
361 |
+
|ar-SA|11514|2033|2974|
|
362 |
+
|az-AZ|11514|2033|2974|
|
363 |
+
|bn-BD|11514|2033|2974|
|
364 |
+
|cy-GB|11514|2033|2974|
|
365 |
+
|da-DK|11514|2033|2974|
|
366 |
+
|de-DE|11514|2033|2974|
|
367 |
+
|el-GR|11514|2033|2974|
|
368 |
+
|en-US|11514|2033|2974|
|
369 |
+
|es-ES|11514|2033|2974|
|
370 |
+
|fa-IR|11514|2033|2974|
|
371 |
+
|fi-FI|11514|2033|2974|
|
372 |
+
|fr-FR|11514|2033|2974|
|
373 |
+
|he-IL|11514|2033|2974|
|
374 |
+
|hi-IN|11514|2033|2974|
|
375 |
+
|hu-HU|11514|2033|2974|
|
376 |
+
|hy-AM|11514|2033|2974|
|
377 |
+
|id-ID|11514|2033|2974|
|
378 |
+
|is-IS|11514|2033|2974|
|
379 |
+
|it-IT|11514|2033|2974|
|
380 |
+
|ja-JP|11514|2033|2974|
|
381 |
+
|jv-ID|11514|2033|2974|
|
382 |
+
|ka-GE|11514|2033|2974|
|
383 |
+
|km-KH|11514|2033|2974|
|
384 |
+
|kn-IN|11514|2033|2974|
|
385 |
+
|ko-KR|11514|2033|2974|
|
386 |
+
|lv-LV|11514|2033|2974|
|
387 |
+
|ml-IN|11514|2033|2974|
|
388 |
+
|mn-MN|11514|2033|2974|
|
389 |
+
|ms-MY|11514|2033|2974|
|
390 |
+
|my-MM|11514|2033|2974|
|
391 |
+
|nb-NO|11514|2033|2974|
|
392 |
+
|nl-NL|11514|2033|2974|
|
393 |
+
|pl-PL|11514|2033|2974|
|
394 |
+
|pt-PT|11514|2033|2974|
|
395 |
+
|ro-RO|11514|2033|2974|
|
396 |
+
|ru-RU|11514|2033|2974|
|
397 |
+
|sl-SL|11514|2033|2974|
|
398 |
+
|sq-AL|11514|2033|2974|
|
399 |
+
|sv-SE|11514|2033|2974|
|
400 |
+
|sw-KE|11514|2033|2974|
|
401 |
+
|ta-IN|11514|2033|2974|
|
402 |
+
|te-IN|11514|2033|2974|
|
403 |
+
|th-TH|11514|2033|2974|
|
404 |
+
|tl-PH|11514|2033|2974|
|
405 |
+
|tr-TR|11514|2033|2974|
|
406 |
+
|ur-PK|11514|2033|2974|
|
407 |
+
|vi-VN|11514|2033|2974|
|
408 |
+
|zh-CN|11514|2033|2974|
|
409 |
+
|zh-TW|11514|2033|2974|
|
410 |
+
|
411 |
+
## Dataset Creation
|
412 |
+
|
413 |
+
### Source Data
|
414 |
+
|
415 |
+
#### Who are the source language producers?
|
416 |
+
|
417 |
+
The corpus has been produced and uploaded by Amazon Alexa.
|
418 |
+
|
419 |
+
### Personal and Sensitive Information
|
420 |
+
|
421 |
+
The corpora is free of personal or sensitive information.
|
422 |
+
|
423 |
+
## Additional Information
|
424 |
+
|
425 |
+
### Dataset Curators
|
426 |
+
|
427 |
+
__MASSIVE__: Jack FitzGerald and Christopher Hench and Charith Peris and Scott Mackie and Kay Rottmann and Ana Sanchez and Aaron Nash and Liam Urbach and Vishesh Kakarala and Richa Singh and Swetha Ranganath and Laurie Crist and Misha Britan and Wouter Leeuwis and Gokhan Tur and Prem Natarajan.
|
428 |
+
|
429 |
+
__SLURP__: Bastianelli, Emanuele and Vanzo, Andrea and Swietojanski, Pawel and Rieser, Verena.
|
430 |
+
|
431 |
+
__Hugging Face__: Labrak Yanis (Not affiliated with the original corpus)
|
432 |
+
|
433 |
+
### Licensing Information
|
434 |
+
|
435 |
+
```plain
|
436 |
+
Copyright Amazon.com Inc. or its affiliates.
|
437 |
+
|
438 |
+
Copyright and license details for the data and modified code can be found in NOTICE.md.
|
439 |
+
|
440 |
+
License for massive repo and code, Apache 2.0:
|
441 |
+
|
442 |
+
Apache License
|
443 |
+
Version 2.0, January 2004
|
444 |
+
http://www.apache.org/licenses/
|
445 |
+
|
446 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
447 |
+
|
448 |
+
1. Definitions.
|
449 |
+
|
450 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
451 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
452 |
+
|
453 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
454 |
+
the copyright owner that is granting the License.
|
455 |
+
|
456 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
457 |
+
other entities that control, are controlled by, or are under common
|
458 |
+
control with that entity. For the purposes of this definition,
|
459 |
+
"control" means (i) the power, direct or indirect, to cause the
|
460 |
+
direction or management of such entity, whether by contract or
|
461 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
462 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
463 |
+
|
464 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
465 |
+
exercising permissions granted by this License.
|
466 |
+
|
467 |
+
"Source" form shall mean the preferred form for making modifications,
|
468 |
+
including but not limited to software source code, documentation
|
469 |
+
source, and configuration files.
|
470 |
+
|
471 |
+
"Object" form shall mean any form resulting from mechanical
|
472 |
+
transformation or translation of a Source form, including but
|
473 |
+
not limited to compiled object code, generated documentation,
|
474 |
+
and conversions to other media types.
|
475 |
+
|
476 |
+
"Work" shall mean the work of authorship, whether in Source or
|
477 |
+
Object form, made available under the License, as indicated by a
|
478 |
+
copyright notice that is included in or attached to the work
|
479 |
+
(an example is provided in the Appendix below).
|
480 |
+
|
481 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
482 |
+
form, that is based on (or derived from) the Work and for which the
|
483 |
+
editorial revisions, annotations, elaborations, or other modifications
|
484 |
+
represent, as a whole, an original work of authorship. For the purposes
|
485 |
+
of this License, Derivative Works shall not include works that remain
|
486 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
487 |
+
the Work and Derivative Works thereof.
|
488 |
+
|
489 |
+
"Contribution" shall mean any work of authorship, including
|
490 |
+
the original version of the Work and any modifications or additions
|
491 |
+
to that Work or Derivative Works thereof, that is intentionally
|
492 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
493 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
494 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
495 |
+
means any form of electronic, verbal, or written communication sent
|
496 |
+
to the Licensor or its representatives, including but not limited to
|
497 |
+
communication on electronic mailing lists, source code control systems,
|
498 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
499 |
+
Licensor for the purpose of discussing and improving the Work, but
|
500 |
+
excluding communication that is conspicuously marked or otherwise
|
501 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
502 |
+
|
503 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
504 |
+
on behalf of whom a Contribution has been received by Licensor and
|
505 |
+
subsequently incorporated within the Work.
|
506 |
+
|
507 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
508 |
+
this License, each Contributor hereby grants to You a perpetual,
|
509 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
510 |
+
copyright license to reproduce, prepare Derivative Works of,
|
511 |
+
publicly display, publicly perform, sublicense, and distribute the
|
512 |
+
Work and such Derivative Works in Source or Object form.
|
513 |
+
|
514 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
515 |
+
this License, each Contributor hereby grants to You a perpetual,
|
516 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
517 |
+
(except as stated in this section) patent license to make, have made,
|
518 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
519 |
+
where such license applies only to those patent claims licensable
|
520 |
+
by such Contributor that are necessarily infringed by their
|
521 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
522 |
+
with the Work to which such Contribution(s) was submitted. If You
|
523 |
+
institute patent litigation against any entity (including a
|
524 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
525 |
+
or a Contribution incorporated within the Work constitutes direct
|
526 |
+
or contributory patent infringement, then any patent licenses
|
527 |
+
granted to You under this License for that Work shall terminate
|
528 |
+
as of the date such litigation is filed.
|
529 |
+
|
530 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
531 |
+
Work or Derivative Works thereof in any medium, with or without
|
532 |
+
modifications, and in Source or Object form, provided that You
|
533 |
+
meet the following conditions:
|
534 |
+
|
535 |
+
(a) You must give any other recipients of the Work or
|
536 |
+
Derivative Works a copy of this License; and
|
537 |
+
|
538 |
+
(b) You must cause any modified files to carry prominent notices
|
539 |
+
stating that You changed the files; and
|
540 |
+
|
541 |
+
(c) You must retain, in the Source form of any Derivative Works
|
542 |
+
that You distribute, all copyright, patent, trademark, and
|
543 |
+
attribution notices from the Source form of the Work,
|
544 |
+
excluding those notices that do not pertain to any part of
|
545 |
+
the Derivative Works; and
|
546 |
+
|
547 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
548 |
+
distribution, then any Derivative Works that You distribute must
|
549 |
+
include a readable copy of the attribution notices contained
|
550 |
+
within such NOTICE file, excluding those notices that do not
|
551 |
+
pertain to any part of the Derivative Works, in at least one
|
552 |
+
of the following places: within a NOTICE text file distributed
|
553 |
+
as part of the Derivative Works; within the Source form or
|
554 |
+
documentation, if provided along with the Derivative Works; or,
|
555 |
+
within a display generated by the Derivative Works, if and
|
556 |
+
wherever such third-party notices normally appear. The contents
|
557 |
+
of the NOTICE file are for informational purposes only and
|
558 |
+
do not modify the License. You may add Your own attribution
|
559 |
+
notices within Derivative Works that You distribute, alongside
|
560 |
+
or as an addendum to the NOTICE text from the Work, provided
|
561 |
+
that such additional attribution notices cannot be construed
|
562 |
+
as modifying the License.
|
563 |
+
|
564 |
+
You may add Your own copyright statement to Your modifications and
|
565 |
+
may provide additional or different license terms and conditions
|
566 |
+
for use, reproduction, or distribution of Your modifications, or
|
567 |
+
for any such Derivative Works as a whole, provided Your use,
|
568 |
+
reproduction, and distribution of the Work otherwise complies with
|
569 |
+
the conditions stated in this License.
|
570 |
+
|
571 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
572 |
+
any Contribution intentionally submitted for inclusion in the Work
|
573 |
+
by You to the Licensor shall be under the terms and conditions of
|
574 |
+
this License, without any additional terms or conditions.
|
575 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
576 |
+
the terms of any separate license agreement you may have executed
|
577 |
+
with Licensor regarding such Contributions.
|
578 |
+
|
579 |
+
6. Trademarks. This License does not grant permission to use the trade
|
580 |
+
names, trademarks, service marks, or product names of the Licensor,
|
581 |
+
except as required for reasonable and customary use in describing the
|
582 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
583 |
+
|
584 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
585 |
+
agreed to in writing, Licensor provides the Work (and each
|
586 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
587 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
588 |
+
implied, including, without limitation, any warranties or conditions
|
589 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
590 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
591 |
+
appropriateness of using or redistributing the Work and assume any
|
592 |
+
risks associated with Your exercise of permissions under this License.
|
593 |
+
|
594 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
595 |
+
whether in tort (including negligence), contract, or otherwise,
|
596 |
+
unless required by applicable law (such as deliberate and grossly
|
597 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
598 |
+
liable to You for damages, including any direct, indirect, special,
|
599 |
+
incidental, or consequential damages of any character arising as a
|
600 |
+
result of this License or out of the use or inability to use the
|
601 |
+
Work (including but not limited to damages for loss of goodwill,
|
602 |
+
work stoppage, computer failure or malfunction, or any and all
|
603 |
+
other commercial damages or losses), even if such Contributor
|
604 |
+
has been advised of the possibility of such damages.
|
605 |
+
|
606 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
607 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
608 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
609 |
+
or other liability obligations and/or rights consistent with this
|
610 |
+
License. However, in accepting such obligations, You may act only
|
611 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
612 |
+
of any other Contributor, and only if You agree to indemnify,
|
613 |
+
defend, and hold each Contributor harmless for any liability
|
614 |
+
incurred by, or claims asserted against, such Contributor by reason
|
615 |
+
of your accepting any such warranty or additional liability.
|
616 |
+
|
617 |
+
END OF TERMS AND CONDITIONS
|
618 |
+
|
619 |
+
APPENDIX: How to apply the Apache License to your work.
|
620 |
+
|
621 |
+
To apply the Apache License to your work, attach the following
|
622 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
623 |
+
replaced with your own identifying information. (Don't include
|
624 |
+
the brackets!) The text should be enclosed in the appropriate
|
625 |
+
comment syntax for the file format. We also recommend that a
|
626 |
+
file or class name and description of purpose be included on the
|
627 |
+
same "printed page" as the copyright notice for easier
|
628 |
+
identification within third-party archives.
|
629 |
+
|
630 |
+
Copyright [yyyy] [name of copyright owner]
|
631 |
+
|
632 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
633 |
+
you may not use this file except in compliance with the License.
|
634 |
+
You may obtain a copy of the License at
|
635 |
+
|
636 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
637 |
+
|
638 |
+
Unless required by applicable law or agreed to in writing, software
|
639 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
640 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
641 |
+
See the License for the specific language governing permissions and
|
642 |
+
limitations under the License.
|
643 |
+
```
|
644 |
+
|
645 |
+
### Citation Information
|
646 |
+
|
647 |
+
Please cite the following paper when using this dataset.
|
648 |
+
|
649 |
+
```latex
|
650 |
+
@misc{fitzgerald2022massive,
|
651 |
+
title={MASSIVE: A 1M-Example Multilingual Natural Language Understanding Dataset with 51 Typologically-Diverse Languages},
|
652 |
+
author={Jack FitzGerald and Christopher Hench and Charith Peris and Scott Mackie and Kay Rottmann and Ana Sanchez and Aaron Nash and Liam Urbach and Vishesh Kakarala and Richa Singh and Swetha Ranganath and Laurie Crist and Misha Britan and Wouter Leeuwis and Gokhan Tur and Prem Natarajan},
|
653 |
+
year={2022},
|
654 |
+
eprint={2204.08582},
|
655 |
+
archivePrefix={arXiv},
|
656 |
+
primaryClass={cs.CL}
|
657 |
+
}
|
658 |
+
|
659 |
+
@inproceedings{bastianelli-etal-2020-slurp,
|
660 |
+
title = "{SLURP}: A Spoken Language Understanding Resource Package",
|
661 |
+
author = "Bastianelli, Emanuele and
|
662 |
+
Vanzo, Andrea and
|
663 |
+
Swietojanski, Pawel and
|
664 |
+
Rieser, Verena",
|
665 |
+
booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)",
|
666 |
+
month = nov,
|
667 |
+
year = "2020",
|
668 |
+
address = "Online",
|
669 |
+
publisher = "Association for Computational Linguistics",
|
670 |
+
url = "https://aclanthology.org/2020.emnlp-main.588",
|
671 |
+
doi = "10.18653/v1/2020.emnlp-main.588",
|
672 |
+
pages = "7252--7262",
|
673 |
+
abstract = "Spoken Language Understanding infers semantic meaning directly from audio data, and thus promises to reduce error propagation and misunderstandings in end-user applications. However, publicly available SLU resources are limited. In this paper, we release SLURP, a new SLU package containing the following: (1) A new challenging dataset in English spanning 18 domains, which is substantially bigger and linguistically more diverse than existing datasets; (2) Competitive baselines based on state-of-the-art NLU and ASR systems; (3) A new transparent metric for entity labelling which enables a detailed error analysis for identifying potential areas of improvement. SLURP is available at https://github.com/pswietojanski/slurp."
|
674 |
+
}
|
675 |
+
```
|
massive.py
ADDED
@@ -0,0 +1,417 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# coding=utf-8
|
2 |
+
|
3 |
+
"""MASSIVE: A 1M-Example Multilingual Natural Language Understanding Dataset with 51 Typologically-Diverse Languages"""
|
4 |
+
|
5 |
+
import json
|
6 |
+
import datasets
|
7 |
+
|
8 |
+
logger = datasets.logging.get_logger(__name__)
|
9 |
+
|
10 |
+
_DESCRIPTION = """\
|
11 |
+
MASSIVE is a parallel dataset of > 1M utterances across 51 languages with annotations
|
12 |
+
for the Natural Language Understanding tasks of intent prediction and slot annotation.
|
13 |
+
Utterances span 60 intents and include 55 slot types. MASSIVE was created by localizing
|
14 |
+
the SLURP dataset, composed of general Intelligent Voice Assistant single-shot interactions.
|
15 |
+
"""
|
16 |
+
|
17 |
+
_CITATION = """\
|
18 |
+
@misc{fitzgerald2022massive,
|
19 |
+
title={MASSIVE: A 1M-Example Multilingual Natural Language Understanding Dataset with 51 Typologically-Diverse Languages},
|
20 |
+
author={Jack FitzGerald and Christopher Hench and Charith Peris and Scott Mackie and Kay Rottmann and Ana Sanchez and Aaron Nash and Liam Urbach and Vishesh Kakarala and Richa Singh and Swetha Ranganath and Laurie Crist and Misha Britan and Wouter Leeuwis and Gokhan Tur and Prem Natarajan},
|
21 |
+
year={2022},
|
22 |
+
eprint={2204.08582},
|
23 |
+
archivePrefix={arXiv},
|
24 |
+
primaryClass={cs.CL}
|
25 |
+
}
|
26 |
+
\
|
27 |
+
@inproceedings{bastianelli-etal-2020-slurp,
|
28 |
+
title = "{SLURP}: A Spoken Language Understanding Resource Package",
|
29 |
+
author = "Bastianelli, Emanuele and
|
30 |
+
Vanzo, Andrea and
|
31 |
+
Swietojanski, Pawel and
|
32 |
+
Rieser, Verena",
|
33 |
+
booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)",
|
34 |
+
month = nov,
|
35 |
+
year = "2020",
|
36 |
+
address = "Online",
|
37 |
+
publisher = "Association for Computational Linguistics",
|
38 |
+
url = "https://aclanthology.org/2020.emnlp-main.588",
|
39 |
+
doi = "10.18653/v1/2020.emnlp-main.588",
|
40 |
+
pages = "7252--7262",
|
41 |
+
abstract = "Spoken Language Understanding infers semantic meaning directly from audio data, and thus promises to reduce error propagation and misunderstandings in end-user applications. However, publicly available SLU resources are limited. In this paper, we release SLURP, a new SLU package containing the following: (1) A new challenging dataset in English spanning 18 domains, which is substantially bigger and linguistically more diverse than existing datasets; (2) Competitive baselines based on state-of-the-art NLU and ASR systems; (3) A new transparent metric for entity labelling which enables a detailed error analysis for identifying potential areas of improvement. SLURP is available at https://github.com/pswietojanski/slurp."
|
42 |
+
}
|
43 |
+
"""
|
44 |
+
|
45 |
+
_LICENSE = """\
|
46 |
+
Copyright Amazon.com Inc. or its affiliates.
|
47 |
+
|
48 |
+
Copyright and license details for the data and modified code can be found in NOTICE.md.
|
49 |
+
|
50 |
+
License for `massive` repo and code, Apache 2.0:
|
51 |
+
|
52 |
+
Apache License
|
53 |
+
Version 2.0, January 2004
|
54 |
+
http://www.apache.org/licenses/
|
55 |
+
|
56 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
57 |
+
|
58 |
+
1. Definitions.
|
59 |
+
|
60 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
61 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
62 |
+
|
63 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
64 |
+
the copyright owner that is granting the License.
|
65 |
+
|
66 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
67 |
+
other entities that control, are controlled by, or are under common
|
68 |
+
control with that entity. For the purposes of this definition,
|
69 |
+
"control" means (i) the power, direct or indirect, to cause the
|
70 |
+
direction or management of such entity, whether by contract or
|
71 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
72 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
73 |
+
|
74 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
75 |
+
exercising permissions granted by this License.
|
76 |
+
|
77 |
+
"Source" form shall mean the preferred form for making modifications,
|
78 |
+
including but not limited to software source code, documentation
|
79 |
+
source, and configuration files.
|
80 |
+
|
81 |
+
"Object" form shall mean any form resulting from mechanical
|
82 |
+
transformation or translation of a Source form, including but
|
83 |
+
not limited to compiled object code, generated documentation,
|
84 |
+
and conversions to other media types.
|
85 |
+
|
86 |
+
"Work" shall mean the work of authorship, whether in Source or
|
87 |
+
Object form, made available under the License, as indicated by a
|
88 |
+
copyright notice that is included in or attached to the work
|
89 |
+
(an example is provided in the Appendix below).
|
90 |
+
|
91 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
92 |
+
form, that is based on (or derived from) the Work and for which the
|
93 |
+
editorial revisions, annotations, elaborations, or other modifications
|
94 |
+
represent, as a whole, an original work of authorship. For the purposes
|
95 |
+
of this License, Derivative Works shall not include works that remain
|
96 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
97 |
+
the Work and Derivative Works thereof.
|
98 |
+
|
99 |
+
"Contribution" shall mean any work of authorship, including
|
100 |
+
the original version of the Work and any modifications or additions
|
101 |
+
to that Work or Derivative Works thereof, that is intentionally
|
102 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
103 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
104 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
105 |
+
means any form of electronic, verbal, or written communication sent
|
106 |
+
to the Licensor or its representatives, including but not limited to
|
107 |
+
communication on electronic mailing lists, source code control systems,
|
108 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
109 |
+
Licensor for the purpose of discussing and improving the Work, but
|
110 |
+
excluding communication that is conspicuously marked or otherwise
|
111 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
112 |
+
|
113 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
114 |
+
on behalf of whom a Contribution has been received by Licensor and
|
115 |
+
subsequently incorporated within the Work.
|
116 |
+
|
117 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
118 |
+
this License, each Contributor hereby grants to You a perpetual,
|
119 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
120 |
+
copyright license to reproduce, prepare Derivative Works of,
|
121 |
+
publicly display, publicly perform, sublicense, and distribute the
|
122 |
+
Work and such Derivative Works in Source or Object form.
|
123 |
+
|
124 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
125 |
+
this License, each Contributor hereby grants to You a perpetual,
|
126 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
127 |
+
(except as stated in this section) patent license to make, have made,
|
128 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
129 |
+
where such license applies only to those patent claims licensable
|
130 |
+
by such Contributor that are necessarily infringed by their
|
131 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
132 |
+
with the Work to which such Contribution(s) was submitted. If You
|
133 |
+
institute patent litigation against any entity (including a
|
134 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
135 |
+
or a Contribution incorporated within the Work constitutes direct
|
136 |
+
or contributory patent infringement, then any patent licenses
|
137 |
+
granted to You under this License for that Work shall terminate
|
138 |
+
as of the date such litigation is filed.
|
139 |
+
|
140 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
141 |
+
Work or Derivative Works thereof in any medium, with or without
|
142 |
+
modifications, and in Source or Object form, provided that You
|
143 |
+
meet the following conditions:
|
144 |
+
|
145 |
+
(a) You must give any other recipients of the Work or
|
146 |
+
Derivative Works a copy of this License; and
|
147 |
+
|
148 |
+
(b) You must cause any modified files to carry prominent notices
|
149 |
+
stating that You changed the files; and
|
150 |
+
|
151 |
+
(c) You must retain, in the Source form of any Derivative Works
|
152 |
+
that You distribute, all copyright, patent, trademark, and
|
153 |
+
attribution notices from the Source form of the Work,
|
154 |
+
excluding those notices that do not pertain to any part of
|
155 |
+
the Derivative Works; and
|
156 |
+
|
157 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
158 |
+
distribution, then any Derivative Works that You distribute must
|
159 |
+
include a readable copy of the attribution notices contained
|
160 |
+
within such NOTICE file, excluding those notices that do not
|
161 |
+
pertain to any part of the Derivative Works, in at least one
|
162 |
+
of the following places: within a NOTICE text file distributed
|
163 |
+
as part of the Derivative Works; within the Source form or
|
164 |
+
documentation, if provided along with the Derivative Works; or,
|
165 |
+
within a display generated by the Derivative Works, if and
|
166 |
+
wherever such third-party notices normally appear. The contents
|
167 |
+
of the NOTICE file are for informational purposes only and
|
168 |
+
do not modify the License. You may add Your own attribution
|
169 |
+
notices within Derivative Works that You distribute, alongside
|
170 |
+
or as an addendum to the NOTICE text from the Work, provided
|
171 |
+
that such additional attribution notices cannot be construed
|
172 |
+
as modifying the License.
|
173 |
+
|
174 |
+
You may add Your own copyright statement to Your modifications and
|
175 |
+
may provide additional or different license terms and conditions
|
176 |
+
for use, reproduction, or distribution of Your modifications, or
|
177 |
+
for any such Derivative Works as a whole, provided Your use,
|
178 |
+
reproduction, and distribution of the Work otherwise complies with
|
179 |
+
the conditions stated in this License.
|
180 |
+
|
181 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
182 |
+
any Contribution intentionally submitted for inclusion in the Work
|
183 |
+
by You to the Licensor shall be under the terms and conditions of
|
184 |
+
this License, without any additional terms or conditions.
|
185 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
186 |
+
the terms of any separate license agreement you may have executed
|
187 |
+
with Licensor regarding such Contributions.
|
188 |
+
|
189 |
+
6. Trademarks. This License does not grant permission to use the trade
|
190 |
+
names, trademarks, service marks, or product names of the Licensor,
|
191 |
+
except as required for reasonable and customary use in describing the
|
192 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
193 |
+
|
194 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
195 |
+
agreed to in writing, Licensor provides the Work (and each
|
196 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
197 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
198 |
+
implied, including, without limitation, any warranties or conditions
|
199 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
200 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
201 |
+
appropriateness of using or redistributing the Work and assume any
|
202 |
+
risks associated with Your exercise of permissions under this License.
|
203 |
+
|
204 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
205 |
+
whether in tort (including negligence), contract, or otherwise,
|
206 |
+
unless required by applicable law (such as deliberate and grossly
|
207 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
208 |
+
liable to You for damages, including any direct, indirect, special,
|
209 |
+
incidental, or consequential damages of any character arising as a
|
210 |
+
result of this License or out of the use or inability to use the
|
211 |
+
Work (including but not limited to damages for loss of goodwill,
|
212 |
+
work stoppage, computer failure or malfunction, or any and all
|
213 |
+
other commercial damages or losses), even if such Contributor
|
214 |
+
has been advised of the possibility of such damages.
|
215 |
+
|
216 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
217 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
218 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
219 |
+
or other liability obligations and/or rights consistent with this
|
220 |
+
License. However, in accepting such obligations, You may act only
|
221 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
222 |
+
of any other Contributor, and only if You agree to indemnify,
|
223 |
+
defend, and hold each Contributor harmless for any liability
|
224 |
+
incurred by, or claims asserted against, such Contributor by reason
|
225 |
+
of your accepting any such warranty or additional liability.
|
226 |
+
|
227 |
+
END OF TERMS AND CONDITIONS
|
228 |
+
|
229 |
+
APPENDIX: How to apply the Apache License to your work.
|
230 |
+
|
231 |
+
To apply the Apache License to your work, attach the following
|
232 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
233 |
+
replaced with your own identifying information. (Don't include
|
234 |
+
the brackets!) The text should be enclosed in the appropriate
|
235 |
+
comment syntax for the file format. We also recommend that a
|
236 |
+
file or class name and description of purpose be included on the
|
237 |
+
same "printed page" as the copyright notice for easier
|
238 |
+
identification within third-party archives.
|
239 |
+
|
240 |
+
Copyright [yyyy] [name of copyright owner]
|
241 |
+
|
242 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
243 |
+
you may not use this file except in compliance with the License.
|
244 |
+
You may obtain a copy of the License at
|
245 |
+
|
246 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
247 |
+
|
248 |
+
Unless required by applicable law or agreed to in writing, software
|
249 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
250 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
251 |
+
See the License for the specific language governing permissions and
|
252 |
+
limitations under the License.
|
253 |
+
"""
|
254 |
+
|
255 |
+
_URL = "https://amazon-massive-nlu-dataset.s3.amazonaws.com/amazon-massive-dataset-1.0.tar.gz"
|
256 |
+
|
257 |
+
_LANGUAGES = ['af-ZA', 'am-ET', 'ar-SA', 'az-AZ', 'bn-BD', 'cy-GB', 'da-DK', 'de-DE', 'el-GR', 'en-US',
|
258 |
+
'es-ES', 'fa-IR', 'fi-FI', 'fr-FR', 'he-IL', 'hi-IN', 'hu-HU', 'hy-AM', 'id-ID', 'is-IS',
|
259 |
+
'it-IT', 'ja-JP', 'jv-ID', 'ka-GE', 'km-KH', 'kn-IN', 'ko-KR', 'lv-LV', 'ml-IN', 'mn-MN',
|
260 |
+
'ms-MY', 'my-MM', 'nb-NO', 'nl-NL', 'pl-PL', 'pt-PT', 'ro-RO', 'ru-RU', 'sl-SL', 'sq-AL',
|
261 |
+
'sv-SE', 'sw-KE', 'ta-IN', 'te-IN', 'th-TH', 'tl-PH', 'tr-TR', 'ur-PK', 'vi-VN', 'zh-CN',
|
262 |
+
'zh-TW']
|
263 |
+
|
264 |
+
_SCENARIOS = ['social', 'transport', 'calendar', 'play', 'news', 'datetime', 'recommendation', 'email',
|
265 |
+
'iot', 'general', 'audio', 'lists', 'qa', 'cooking', 'takeaway', 'music', 'alarm', 'weather']
|
266 |
+
|
267 |
+
_INTENTS = ['datetime_query', 'iot_hue_lightchange', 'transport_ticket', 'takeaway_query', 'qa_stock',
|
268 |
+
'general_greet', 'recommendation_events', 'music_dislikeness', 'iot_wemo_off', 'cooking_recipe',
|
269 |
+
'qa_currency', 'transport_traffic', 'general_quirky', 'weather_query', 'audio_volume_up',
|
270 |
+
'email_addcontact', 'takeaway_order', 'email_querycontact', 'iot_hue_lightup',
|
271 |
+
'recommendation_locations', 'play_audiobook', 'lists_createoradd', 'news_query',
|
272 |
+
'alarm_query', 'iot_wemo_on', 'general_joke', 'qa_definition', 'social_query',
|
273 |
+
'music_settings', 'audio_volume_other', 'calendar_remove', 'iot_hue_lightdim',
|
274 |
+
'calendar_query', 'email_sendemail', 'iot_cleaning', 'audio_volume_down',
|
275 |
+
'play_radio', 'cooking_query', 'datetime_convert', 'qa_maths', 'iot_hue_lightoff',
|
276 |
+
'iot_hue_lighton', 'transport_query', 'music_likeness', 'email_query', 'play_music',
|
277 |
+
'audio_volume_mute', 'social_post', 'alarm_set', 'qa_factoid', 'calendar_set',
|
278 |
+
'play_game', 'alarm_remove', 'lists_remove', 'transport_taxi', 'recommendation_movies',
|
279 |
+
'iot_coffee', 'music_query', 'play_podcasts', 'lists_query']
|
280 |
+
|
281 |
+
class MASSIVE(datasets.GeneratorBasedBuilder):
|
282 |
+
"""MASSIVE: A 1M-Example Multilingual Natural Language Understanding Dataset with 51 Typologically-Diverse Languages"""
|
283 |
+
|
284 |
+
BUILDER_CONFIGS = [
|
285 |
+
datasets.BuilderConfig(
|
286 |
+
name = name,
|
287 |
+
version = datasets.Version("1.0.0"),
|
288 |
+
description = f"The MASSIVE corpora for {name}",
|
289 |
+
) for name in _LANGUAGES
|
290 |
+
]
|
291 |
+
|
292 |
+
DEFAULT_CONFIG_NAME = "en-US"
|
293 |
+
|
294 |
+
def _info(self):
|
295 |
+
return datasets.DatasetInfo(
|
296 |
+
description=_DESCRIPTION,
|
297 |
+
features=datasets.Features(
|
298 |
+
{
|
299 |
+
"id": datasets.Value("string"),
|
300 |
+
"locale": datasets.Value("string"),
|
301 |
+
"partition": datasets.Value("string"),
|
302 |
+
"scenario": datasets.features.ClassLabel(names=_SCENARIOS),
|
303 |
+
"intent": datasets.features.ClassLabel(names=_INTENTS),
|
304 |
+
"utt": datasets.Value("string"),
|
305 |
+
"annot_utt": datasets.Value("string"),
|
306 |
+
"worker_id": datasets.Value("string"),
|
307 |
+
"slot_method": datasets.Sequence({
|
308 |
+
"slot": datasets.Value("string"),
|
309 |
+
"method": datasets.Value("string"),
|
310 |
+
}),
|
311 |
+
"judgments": datasets.Sequence({
|
312 |
+
"worker_id": datasets.Value("string"),
|
313 |
+
"intent_score": datasets.Value("int8"),
|
314 |
+
"slots_score": datasets.Value("int8"),
|
315 |
+
"grammar_score": datasets.Value("int8"),
|
316 |
+
"spelling_score": datasets.Value("int8"),
|
317 |
+
"language_identification": datasets.Value("string"),
|
318 |
+
}),
|
319 |
+
},
|
320 |
+
),
|
321 |
+
supervised_keys=None,
|
322 |
+
homepage="https://github.com/alexa/massive",
|
323 |
+
citation=_CITATION,
|
324 |
+
license=_LICENSE,
|
325 |
+
)
|
326 |
+
|
327 |
+
def _split_generators(self, dl_manager):
|
328 |
+
|
329 |
+
path = dl_manager.download_and_extract(_URL)
|
330 |
+
|
331 |
+
return [
|
332 |
+
datasets.SplitGenerator(
|
333 |
+
name=datasets.Split.TRAIN,
|
334 |
+
gen_kwargs={
|
335 |
+
"filepath": path,
|
336 |
+
"split": "train",
|
337 |
+
"lang": self.config.name,
|
338 |
+
}
|
339 |
+
),
|
340 |
+
datasets.SplitGenerator(
|
341 |
+
name=datasets.Split.VALIDATION,
|
342 |
+
gen_kwargs={
|
343 |
+
"filepath": path,
|
344 |
+
"split": "dev",
|
345 |
+
"lang": self.config.name,
|
346 |
+
}
|
347 |
+
),
|
348 |
+
datasets.SplitGenerator(
|
349 |
+
name=datasets.Split.TEST,
|
350 |
+
gen_kwargs={
|
351 |
+
"filepath": path,
|
352 |
+
"split": "test",
|
353 |
+
"lang": self.config.name,
|
354 |
+
}
|
355 |
+
),
|
356 |
+
]
|
357 |
+
|
358 |
+
def _generate_examples(self, filepath, split, lang):
|
359 |
+
|
360 |
+
filepath = filepath + "/1.0/data/" + lang + ".jsonl"
|
361 |
+
|
362 |
+
logger.info("⏳ Generating examples from = %s", filepath)
|
363 |
+
|
364 |
+
# Read the file
|
365 |
+
f = open(filepath,"r")
|
366 |
+
lines = f.read().split("\n")
|
367 |
+
f.close()
|
368 |
+
|
369 |
+
key_ = 0
|
370 |
+
|
371 |
+
for line in lines:
|
372 |
+
|
373 |
+
data = json.loads(line)
|
374 |
+
|
375 |
+
if data["partition"] != split:
|
376 |
+
continue
|
377 |
+
|
378 |
+
# Slot method
|
379 |
+
if "slot_method" in data:
|
380 |
+
slot_method = [
|
381 |
+
{
|
382 |
+
"slot": s["slot"],
|
383 |
+
"method": s["method"],
|
384 |
+
} for s in data["slot_method"]
|
385 |
+
]
|
386 |
+
else:
|
387 |
+
slot_method = []
|
388 |
+
|
389 |
+
# Judgments
|
390 |
+
if "judgments" in data:
|
391 |
+
judgments = [
|
392 |
+
{
|
393 |
+
"worker_id": j["worker_id"],
|
394 |
+
"intent_score": j["intent_score"],
|
395 |
+
"slots_score": j["slots_score"],
|
396 |
+
"grammar_score": j["grammar_score"],
|
397 |
+
"spelling_score": j["spelling_score"],
|
398 |
+
"language_identification": j["language_identification"],
|
399 |
+
} for j in data["judgments"]
|
400 |
+
]
|
401 |
+
else:
|
402 |
+
judgments = []
|
403 |
+
|
404 |
+
yield key_, {
|
405 |
+
"id": data["id"],
|
406 |
+
"locale": data["locale"],
|
407 |
+
"partition": data["partition"],
|
408 |
+
"scenario": data["scenario"],
|
409 |
+
"intent": data["intent"],
|
410 |
+
"utt": data["utt"],
|
411 |
+
"annot_utt": data["annot_utt"],
|
412 |
+
"worker_id": data["worker_id"],
|
413 |
+
"slot_method": slot_method,
|
414 |
+
"judgments": judgments,
|
415 |
+
}
|
416 |
+
|
417 |
+
key_ += 1
|
test_massive.py
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from datasets import load_dataset
|
2 |
+
|
3 |
+
source = "AmazonScience/massive"
|
4 |
+
|
5 |
+
dataset = load_dataset(source, "en-US", download_mode="force_redownload")
|
6 |
+
print(dataset)
|
7 |
+
print(dataset["train"][0])
|