Datasets:

Modalities:
Text
ArXiv:
Libraries:
Datasets
parquet-converter commited on
Commit
2d042bc
1 Parent(s): bbbbe10

Update parquet files

Browse files
.gitattributes DELETED
@@ -1,37 +0,0 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ftz filter=lfs diff=lfs merge=lfs -text
6
- *.gz filter=lfs diff=lfs merge=lfs -text
7
- *.h5 filter=lfs diff=lfs merge=lfs -text
8
- *.joblib filter=lfs diff=lfs merge=lfs -text
9
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
10
- *.model filter=lfs diff=lfs merge=lfs -text
11
- *.msgpack filter=lfs diff=lfs merge=lfs -text
12
- *.onnx filter=lfs diff=lfs merge=lfs -text
13
- *.ot filter=lfs diff=lfs merge=lfs -text
14
- *.parquet filter=lfs diff=lfs merge=lfs -text
15
- *.pb filter=lfs diff=lfs merge=lfs -text
16
- *.pt filter=lfs diff=lfs merge=lfs -text
17
- *.pth filter=lfs diff=lfs merge=lfs -text
18
- *.rar filter=lfs diff=lfs merge=lfs -text
19
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
20
- *.tar.* filter=lfs diff=lfs merge=lfs -text
21
- *.tflite filter=lfs diff=lfs merge=lfs -text
22
- *.tgz filter=lfs diff=lfs merge=lfs -text
23
- *.wasm filter=lfs diff=lfs merge=lfs -text
24
- *.xz filter=lfs diff=lfs merge=lfs -text
25
- *.zip filter=lfs diff=lfs merge=lfs -text
26
- *.zstandard filter=lfs diff=lfs merge=lfs -text
27
- *tfevents* filter=lfs diff=lfs merge=lfs -text
28
- # Audio files - uncompressed
29
- *.pcm filter=lfs diff=lfs merge=lfs -text
30
- *.sam filter=lfs diff=lfs merge=lfs -text
31
- *.raw filter=lfs diff=lfs merge=lfs -text
32
- # Audio files - compressed
33
- *.aac filter=lfs diff=lfs merge=lfs -text
34
- *.flac filter=lfs diff=lfs merge=lfs -text
35
- *.mp3 filter=lfs diff=lfs merge=lfs -text
36
- *.ogg filter=lfs diff=lfs merge=lfs -text
37
- *.wav filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.gitignore DELETED
@@ -1,2 +0,0 @@
1
- .venv/
2
- .python-version
 
 
 
README.md DELETED
@@ -1,36 +0,0 @@
1
- # Dialog bAbI tasks data
2
- In this directory is the set of 6 tasks for testing end-to-end dialog systems in the restaurant domain as described in the paper "Learning End-to-End Goal-Oriented Dialog" by Bordes & Weston (http://arxiv.org/abs/1605.07683). The aim is that each task tests a unique aspect of dialog. Tasks are designed to complement the set of 20 bAbI tasks for story understanding already released with the paper "Towards AI Complete Question Answering: A Set of Prerequisite Toy Tasks" by Weston et al. (http://arxiv.org/abs/1502.05698).
3
-
4
-
5
- ## Data
6
- For each task, there are 1000 dialogs for training, 1000 for development and 1000 for testing. For tasks 1-5, we also include a second test set (with suffix -OOV.txt) that contains dialogs including entities not present in training and development sets.
7
-
8
- The file format for each task is as follows:
9
- `ID user_utterance [tab] bot_utterances`
10
-
11
- The IDs for a given dialog start at 1 and increase. When the IDs in a file reset back to 1 you can consider the following sentences as a new dialog. When the bot speaks two times in a row, we used the special token "<SILENCE>" to fill in for the missing user utterance.
12
-
13
- For example (for task 1):
14
- ```
15
- 1 hi hello what can i help you with today
16
- 2 can you make a restaurant reservation with italian cuisine for six people in a cheap price range i'm on it
17
- 3 <SILENCE> where should it be
18
- 4 rome please ok let me look into some options for you
19
- 5 <SILENCE> api_call italian rome six cheap
20
- ```
21
-
22
- The goal of the tasks is to predict the bot utterances, that can be sentences or API calls (sentences starting with the special token "api_call").
23
-
24
- Along with the train, dev and test sets, we also include a knowledge base file (dialog-babi-kb-all.txt) that contain all entities appearing in dialogs for tasks 1-5. We also include a file containing the candidates to select the answer from (dialog-babi-candidates.txt) for tasks 1-5, that is simply made of all the bot utterances in train, dev, test for these tasks.
25
-
26
- Task 6 is a bit different since its data comes from the Dialog State Tracking Challenge 2 (http://camdial.org/~mh521/dstc/), which we modified to convert it into the same format as the other tasks. There is no OOV test set associated with this task and the knowledge base (dialog-babi-task6-dstc2-kb.txt) is imperfect. This task has its own candidates file (dialog-babi-task6-dstc2-candidates.txt).
27
-
28
-
29
- ## License
30
- This dataset is released under Creative Commons Attribution 3.0 Unported license. A copy of this license is included with the data.
31
-
32
-
33
- ## Contact
34
- The author of this porting is Alessandro Suglia and he has only made available the dataset via
35
- Huggingface datasets.
36
- For more details on the dataset and baselines, see the paper "Learning End-to-End Goal-Oriented Dialog" by Antoine Bordes and Jason Weston (http://arxiv.org/abs/1605.07683). For any information, contact Antoine Bordes : abordes (at) fb (dot) com .
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dataset_infos.json DELETED
The diff for this file is too large to render. See raw diff
 
dialog_babi.py DELETED
@@ -1,525 +0,0 @@
1
- # Copyright 2022 The HuggingFace Datasets Authors and the current dataset script contributor.
2
- # Dataset license is specified in the folder data/LICENSE.txt
3
-
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
-
16
- import os
17
- from unicodedata import name
18
-
19
- import datasets
20
-
21
- _CITATION = """\
22
- @article{bordes2016learning,
23
- title={Learning end-to-end goal-oriented dialog},
24
- author={Bordes, Antoine and Boureau, Y-Lan and Weston, Jason},
25
- journal={arXiv preprint arXiv:1605.07683},
26
- year={2016}
27
- }
28
- """
29
-
30
- _DESCRIPTION = """\
31
- This section presents the set of 6 tasks for testing end-to-end dialog systems in the restaurant domain described in the paper:
32
-
33
- Antoine Bordes, Y-Lan Boureau, Jason Weston, Learning End-to-End Goal-Oriented Dialog, arxiv:1605.07683.
34
-
35
- Each task tests a unique aspect of dialog. Tasks are designed to complement the set of 20 bAbI tasks for story understanding of the previous section.
36
-
37
- For each task, there are 1000 dialogs for training, 1000 for development and 1000 for testing. For tasks 1-5, we also include a second test set (with suffix -OOV.txt) that contains dialogs including entities not present in training and development sets.
38
-
39
- """
40
-
41
- _HOMEPAGE = "https://research.facebook.com/downloads/babi/"
42
-
43
- _LICENSE = """
44
- CC License
45
-
46
- Dialog bAbI tasks data
47
-
48
- Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
49
-
50
- Creative Commons Legal Code
51
-
52
- Attribution 3.0 Unported
53
-
54
- CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
55
- LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN
56
- ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
57
- INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
58
- REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR
59
- DAMAGES RESULTING FROM ITS USE.
60
-
61
- License
62
-
63
- THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
64
- COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
65
- COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
66
- AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
67
-
68
- BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
69
- TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY
70
- BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS
71
- CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
72
- CONDITIONS.
73
-
74
- 1. Definitions
75
-
76
- a. "Adaptation" means a work based upon the Work, or upon the Work and
77
- other pre-existing works, such as a translation, adaptation,
78
- derivative work, arrangement of music or other alterations of a
79
- literary or artistic work, or phonogram or performance and includes
80
- cinematographic adaptations or any other form in which the Work may be
81
- recast, transformed, or adapted including in any form recognizably
82
- derived from the original, except that a work that constitutes a
83
- Collection will not be considered an Adaptation for the purpose of
84
- this License. For the avoidance of doubt, where the Work is a musical
85
- work, performance or phonogram, the synchronization of the Work in
86
- timed-relation with a moving image ("synching") will be considered an
87
- Adaptation for the purpose of this License.
88
- b. "Collection" means a collection of literary or artistic works, such as
89
- encyclopedias and anthologies, or performances, phonograms or
90
- broadcasts, or other works or subject matter other than works listed
91
- in Section 1(f) below, which, by reason of the selection and
92
- arrangement of their contents, constitute intellectual creations, in
93
- which the Work is included in its entirety in unmodified form along
94
- with one or more other contributions, each constituting separate and
95
- independent works in themselves, which together are assembled into a
96
- collective whole. A work that constitutes a Collection will not be
97
- considered an Adaptation (as defined above) for the purposes of this
98
- License.
99
- c. "Distribute" means to make available to the public the original and
100
- copies of the Work or Adaptation, as appropriate, through sale or
101
- other transfer of ownership.
102
- d. "Licensor" means the individual, individuals, entity or entities that
103
- offer(s) the Work under the terms of this License.
104
- e. "Original Author" means, in the case of a literary or artistic work,
105
- the individual, individuals, entity or entities who created the Work
106
- or if no individual or entity can be identified, the publisher; and in
107
- addition (i) in the case of a performance the actors, singers,
108
- musicians, dancers, and other persons who act, sing, deliver, declaim,
109
- play in, interpret or otherwise perform literary or artistic works or
110
- expressions of folklore; (ii) in the case of a phonogram the producer
111
- being the person or legal entity who first fixes the sounds of a
112
- performance or other sounds; and, (iii) in the case of broadcasts, the
113
- organization that transmits the broadcast.
114
- f. "Work" means the literary and/or artistic work offered under the terms
115
- of this License including without limitation any production in the
116
- literary, scientific and artistic domain, whatever may be the mode or
117
- form of its expression including digital form, such as a book,
118
- pamphlet and other writing; a lecture, address, sermon or other work
119
- of the same nature; a dramatic or dramatico-musical work; a
120
- choreographic work or entertainment in dumb show; a musical
121
- composition with or without words; a cinematographic work to which are
122
- assimilated works expressed by a process analogous to cinematography;
123
- a work of drawing, painting, architecture, sculpture, engraving or
124
- lithography; a photographic work to which are assimilated works
125
- expressed by a process analogous to photography; a work of applied
126
- art; an illustration, map, plan, sketch or three-dimensional work
127
- relative to geography, topography, architecture or science; a
128
- performance; a broadcast; a phonogram; a compilation of data to the
129
- extent it is protected as a copyrightable work; or a work performed by
130
- a variety or circus performer to the extent it is not otherwise
131
- considered a literary or artistic work.
132
- g. "You" means an individual or entity exercising rights under this
133
- License who has not previously violated the terms of this License with
134
- respect to the Work, or who has received express permission from the
135
- Licensor to exercise rights under this License despite a previous
136
- violation.
137
- h. "Publicly Perform" means to perform public recitations of the Work and
138
- to communicate to the public those public recitations, by any means or
139
- process, including by wire or wireless means or public digital
140
- performances; to make available to the public Works in such a way that
141
- members of the public may access these Works from a place and at a
142
- place individually chosen by them; to perform the Work to the public
143
- by any means or process and the communication to the public of the
144
- performances of the Work, including by public digital performance; to
145
- broadcast and rebroadcast the Work by any means including signs,
146
- sounds or images.
147
- i. "Reproduce" means to make copies of the Work by any means including
148
- without limitation by sound or visual recordings and the right of
149
- fixation and reproducing fixations of the Work, including storage of a
150
- protected performance or phonogram in digital form or other electronic
151
- medium.
152
-
153
- 2. Fair Dealing Rights. Nothing in this License is intended to reduce,
154
- limit, or restrict any uses free from copyright or rights arising from
155
- limitations or exceptions that are provided for in connection with the
156
- copyright protection under copyright law or other applicable laws.
157
-
158
- 3. License Grant. Subject to the terms and conditions of this License,
159
- Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
160
- perpetual (for the duration of the applicable copyright) license to
161
- exercise the rights in the Work as stated below:
162
-
163
- a. to Reproduce the Work, to incorporate the Work into one or more
164
- Collections, and to Reproduce the Work as incorporated in the
165
- Collections;
166
- b. to create and Reproduce Adaptations provided that any such Adaptation,
167
- including any translation in any medium, takes reasonable steps to
168
- clearly label, demarcate or otherwise identify that changes were made
169
- to the original Work. For example, a translation could be marked "The
170
- original work was translated from English to Spanish," or a
171
- modification could indicate "The original work has been modified.";
172
- c. to Distribute and Publicly Perform the Work including as incorporated
173
- in Collections; and,
174
- d. to Distribute and Publicly Perform Adaptations.
175
- e. For the avoidance of doubt:
176
-
177
- i. Non-waivable Compulsory License Schemes. In those jurisdictions in
178
- which the right to collect royalties through any statutory or
179
- compulsory licensing scheme cannot be waived, the Licensor
180
- reserves the exclusive right to collect such royalties for any
181
- exercise by You of the rights granted under this License;
182
- ii. Waivable Compulsory License Schemes. In those jurisdictions in
183
- which the right to collect royalties through any statutory or
184
- compulsory licensing scheme can be waived, the Licensor waives the
185
- exclusive right to collect such royalties for any exercise by You
186
- of the rights granted under this License; and,
187
- iii. Voluntary License Schemes. The Licensor waives the right to
188
- collect royalties, whether individually or, in the event that the
189
- Licensor is a member of a collecting society that administers
190
- voluntary licensing schemes, via that society, from any exercise
191
- by You of the rights granted under this License.
192
-
193
- The above rights may be exercised in all media and formats whether now
194
- known or hereafter devised. The above rights include the right to make
195
- such modifications as are technically necessary to exercise the rights in
196
- other media and formats. Subject to Section 8(f), all rights not expressly
197
- granted by Licensor are hereby reserved.
198
-
199
- 4. Restrictions. The license granted in Section 3 above is expressly made
200
- subject to and limited by the following restrictions:
201
-
202
- a. You may Distribute or Publicly Perform the Work only under the terms
203
- of this License. You must include a copy of, or the Uniform Resource
204
- Identifier (URI) for, this License with every copy of the Work You
205
- Distribute or Publicly Perform. You may not offer or impose any terms
206
- on the Work that restrict the terms of this License or the ability of
207
- the recipient of the Work to exercise the rights granted to that
208
- recipient under the terms of the License. You may not sublicense the
209
- Work. You must keep intact all notices that refer to this License and
210
- to the disclaimer of warranties with every copy of the Work You
211
- Distribute or Publicly Perform. When You Distribute or Publicly
212
- Perform the Work, You may not impose any effective technological
213
- measures on the Work that restrict the ability of a recipient of the
214
- Work from You to exercise the rights granted to that recipient under
215
- the terms of the License. This Section 4(a) applies to the Work as
216
- incorporated in a Collection, but this does not require the Collection
217
- apart from the Work itself to be made subject to the terms of this
218
- License. If You create a Collection, upon notice from any Licensor You
219
- must, to the extent practicable, remove from the Collection any credit
220
- as required by Section 4(b), as requested. If You create an
221
- Adaptation, upon notice from any Licensor You must, to the extent
222
- practicable, remove from the Adaptation any credit as required by
223
- Section 4(b), as requested.
224
- b. If You Distribute, or Publicly Perform the Work or any Adaptations or
225
- Collections, You must, unless a request has been made pursuant to
226
- Section 4(a), keep intact all copyright notices for the Work and
227
- provide, reasonable to the medium or means You are utilizing: (i) the
228
- name of the Original Author (or pseudonym, if applicable) if supplied,
229
- and/or if the Original Author and/or Licensor designate another party
230
- or parties (e.g., a sponsor institute, publishing entity, journal) for
231
- attribution ("Attribution Parties") in Licensor's copyright notice,
232
- terms of service or by other reasonable means, the name of such party
233
- or parties; (ii) the title of the Work if supplied; (iii) to the
234
- extent reasonably practicable, the URI, if any, that Licensor
235
- specifies to be associated with the Work, unless such URI does not
236
- refer to the copyright notice or licensing information for the Work;
237
- and (iv) , consistent with Section 3(b), in the case of an Adaptation,
238
- a credit identifying the use of the Work in the Adaptation (e.g.,
239
- "French translation of the Work by Original Author," or "Screenplay
240
- based on original Work by Original Author"). The credit required by
241
- this Section 4 (b) may be implemented in any reasonable manner;
242
- provided, however, that in the case of a Adaptation or Collection, at
243
- a minimum such credit will appear, if a credit for all contributing
244
- authors of the Adaptation or Collection appears, then as part of these
245
- credits and in a manner at least as prominent as the credits for the
246
- other contributing authors. For the avoidance of doubt, You may only
247
- use the credit required by this Section for the purpose of attribution
248
- in the manner set out above and, by exercising Your rights under this
249
- License, You may not implicitly or explicitly assert or imply any
250
- connection with, sponsorship or endorsement by the Original Author,
251
- Licensor and/or Attribution Parties, as appropriate, of You or Your
252
- use of the Work, without the separate, express prior written
253
- permission of the Original Author, Licensor and/or Attribution
254
- Parties.
255
- c. Except as otherwise agreed in writing by the Licensor or as may be
256
- otherwise permitted by applicable law, if You Reproduce, Distribute or
257
- Publicly Perform the Work either by itself or as part of any
258
- Adaptations or Collections, You must not distort, mutilate, modify or
259
- take other derogatory action in relation to the Work which would be
260
- prejudicial to the Original Author's honor or reputation. Licensor
261
- agrees that in those jurisdictions (e.g. Japan), in which any exercise
262
- of the right granted in Section 3(b) of this License (the right to
263
- make Adaptations) would be deemed to be a distortion, mutilation,
264
- modification or other derogatory action prejudicial to the Original
265
- Author's honor and reputation, the Licensor will waive or not assert,
266
- as appropriate, this Section, to the fullest extent permitted by the
267
- applicable national law, to enable You to reasonably exercise Your
268
- right under Section 3(b) of this License (right to make Adaptations)
269
- but not otherwise.
270
-
271
- 5. Representations, Warranties and Disclaimer
272
-
273
- UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
274
- OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
275
- KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
276
- INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
277
- FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
278
- LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
279
- WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
280
- OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
281
-
282
- 6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE
283
- LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR
284
- ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES
285
- ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS
286
- BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
287
-
288
- 7. Termination
289
-
290
- a. This License and the rights granted hereunder will terminate
291
- automatically upon any breach by You of the terms of this License.
292
- Individuals or entities who have received Adaptations or Collections
293
- from You under this License, however, will not have their licenses
294
- terminated provided such individuals or entities remain in full
295
- compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will
296
- survive any termination of this License.
297
- b. Subject to the above terms and conditions, the license granted here is
298
- perpetual (for the duration of the applicable copyright in the Work).
299
- Notwithstanding the above, Licensor reserves the right to release the
300
- Work under different license terms or to stop distributing the Work at
301
- any time; provided, however that any such election will not serve to
302
- withdraw this License (or any other license that has been, or is
303
- required to be, granted under the terms of this License), and this
304
- License will continue in full force and effect unless terminated as
305
- stated above.
306
-
307
- 8. Miscellaneous
308
-
309
- a. Each time You Distribute or Publicly Perform the Work or a Collection,
310
- the Licensor offers to the recipient a license to the Work on the same
311
- terms and conditions as the license granted to You under this License.
312
- b. Each time You Distribute or Publicly Perform an Adaptation, Licensor
313
- offers to the recipient a license to the original Work on the same
314
- terms and conditions as the license granted to You under this License.
315
- c. If any provision of this License is invalid or unenforceable under
316
- applicable law, it shall not affect the validity or enforceability of
317
- the remainder of the terms of this License, and without further action
318
- by the parties to this agreement, such provision shall be reformed to
319
- the minimum extent necessary to make such provision valid and
320
- enforceable.
321
- d. No term or provision of this License shall be deemed waived and no
322
- breach consented to unless such waiver or consent shall be in writing
323
- and signed by the party to be charged with such waiver or consent.
324
- e. This License constitutes the entire agreement between the parties with
325
- respect to the Work licensed here. There are no understandings,
326
- agreements or representations with respect to the Work not specified
327
- here. Licensor shall not be bound by any additional provisions that
328
- may appear in any communication from You. This License may not be
329
- modified without the mutual written agreement of the Licensor and You.
330
- f. The rights granted under, and the subject matter referenced, in this
331
- License were drafted utilizing the terminology of the Berne Convention
332
- for the Protection of Literary and Artistic Works (as amended on
333
- September 28, 1979), the Rome Convention of 1961, the WIPO Copyright
334
- Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996
335
- and the Universal Copyright Convention (as revised on July 24, 1971).
336
- These rights and subject matter take effect in the relevant
337
- jurisdiction in which the License terms are sought to be enforced
338
- according to the corresponding provisions of the implementation of
339
- those treaty provisions in the applicable national law. If the
340
- standard suite of rights granted under applicable copyright law
341
- includes additional rights not granted under this License, such
342
- additional rights are deemed to be included in the License; this
343
- License is not intended to restrict the license of any rights under
344
- applicable law.
345
-
346
-
347
- Creative Commons Notice
348
-
349
- Creative Commons is not a party to this License, and makes no warranty
350
- whatsoever in connection with the Work. Creative Commons will not be
351
- liable to You or any party on any legal theory for any damages
352
- whatsoever, including without limitation any general, special,
353
- incidental or consequential damages arising in connection to this
354
- license. Notwithstanding the foregoing two (2) sentences, if Creative
355
- Commons has expressly identified itself as the Licensor hereunder, it
356
- shall have all rights and obligations of Licensor.
357
-
358
- Except for the limited purpose of indicating to the public that the
359
- Work is licensed under the CCPL, Creative Commons does not authorize
360
- the use by either party of the trademark "Creative Commons" or any
361
- related trademark or logo of Creative Commons without the prior
362
- written consent of Creative Commons. Any permitted use will be in
363
- compliance with Creative Commons' then-current trademark usage
364
- guidelines, as may be published on its website or otherwise made
365
- available upon request from time to time. For the avoidance of doubt,
366
- this trademark restriction does not form part of this License.
367
-
368
- Creative Commons may be contacted at https://creativecommons.org/.
369
- """
370
-
371
- DIALOG_BABI_ARCHIVE_URL = "https://www.dropbox.com/s/20rgyj8rryvos9l/dialog-bAbI-tasks-1_6.zip?dl=1"
372
-
373
-
374
- class DialogBabi(datasets.GeneratorBasedBuilder):
375
- """Facebook's dataset 'dialog-babi' for end-to-end dialogue learning."""
376
-
377
- VERSION = datasets.Version("1.0.0")
378
-
379
- BUILDER_CONFIGS = [
380
- datasets.BuilderConfig(name="task1-API-calls", version=VERSION, description="Issuing API calls"),
381
- datasets.BuilderConfig(name="task2-API-refine", version=VERSION, description="Updating API calls"),
382
- datasets.BuilderConfig(name="task3-options", version=VERSION, description="Displaying options"),
383
- datasets.BuilderConfig(name="task4-phone-address", version=VERSION, description="Providing extra information"),
384
- datasets.BuilderConfig(name="task5-full-dialogs", version=VERSION, description="Conducting full dialogs"),
385
- datasets.BuilderConfig(name="task6-dstc2", version=VERSION, description="2nd Dialog State Tracking Challenge (Henderson et al., 2014a)"),
386
- ]
387
-
388
- DEFAULT_CONFIG_NAME = "task1-API-calls"
389
- CONFIGS_WITH_KB = ("task3-options", "task4-phone-address", "task5-full-dialogs")
390
-
391
- def _info(self):
392
- if self.config.name in self.CONFIGS_WITH_KB:
393
- features = datasets.Features(
394
- {
395
- "user_turns": datasets.Sequence(datasets.Value("string")),
396
- "system_turns": datasets.Sequence(datasets.Value("string")),
397
- "kb_facts": datasets.Sequence(feature={"turn_id":datasets.Value("int32"), "fact":datasets.Value("string")})
398
- }
399
- )
400
- else:
401
- features = datasets.Features(
402
- {
403
- "user_turns": datasets.Sequence(datasets.Value("string")),
404
- "system_turns": datasets.Sequence(datasets.Value("string"))
405
- }
406
- )
407
- return datasets.DatasetInfo(
408
- description=_DESCRIPTION,
409
- features=features,
410
- homepage=_HOMEPAGE,
411
- license=_LICENSE,
412
- citation=_CITATION,
413
- )
414
-
415
- def _split_generators(self, dl_manager):
416
- data_dir = dl_manager.download_and_extract(DIALOG_BABI_ARCHIVE_URL)
417
- task_data_dir = os.path.join(data_dir, "dialog-bAbI-tasks-1_6", self.config.name)
418
-
419
- if self.config.name == "task6-dstc2":
420
- return [
421
- datasets.SplitGenerator(
422
- name=datasets.Split.TRAIN,
423
- # These kwargs will be passed to _generate_examples
424
- gen_kwargs={
425
- "filepath": os.path.join(task_data_dir, f"dialog-babi-{self.config.name}-trn.txt"),
426
- "split": f"{self.config.name}-train",
427
- },
428
- ),
429
- datasets.SplitGenerator(
430
- name=datasets.Split.VALIDATION,
431
- # These kwargs will be passed to _generate_examples
432
- gen_kwargs={
433
- "filepath": os.path.join(task_data_dir, f"dialog-babi-{self.config.name}-dev.txt"),
434
- "split": f"{self.config.name}-dev",
435
- },
436
- ),
437
- datasets.SplitGenerator(
438
- name=datasets.Split.TEST,
439
- # These kwargs will be passed to _generate_examples
440
- gen_kwargs={
441
- "filepath": os.path.join(task_data_dir, f"dialog-babi-{self.config.name}-tst.txt"),
442
- "split": f"{self.config.name}-test"
443
- },
444
- )
445
- ]
446
-
447
- return [
448
- datasets.SplitGenerator(
449
- name=datasets.Split.TRAIN,
450
- # These kwargs will be passed to _generate_examples
451
- gen_kwargs={
452
- "filepath": os.path.join(task_data_dir, f"dialog-babi-{self.config.name}-trn.txt"),
453
- "split": f"{self.config.name}-train",
454
- },
455
- ),
456
- datasets.SplitGenerator(
457
- name=datasets.Split.VALIDATION,
458
- # These kwargs will be passed to _generate_examples
459
- gen_kwargs={
460
- "filepath": os.path.join(task_data_dir, f"dialog-babi-{self.config.name}-dev.txt"),
461
- "split": f"{self.config.name}-dev",
462
- },
463
- ),
464
- datasets.SplitGenerator(
465
- name=datasets.Split.TEST,
466
- # These kwargs will be passed to _generate_examples
467
- gen_kwargs={
468
- "filepath": os.path.join(task_data_dir, f"dialog-babi-{self.config.name}-tst.txt"),
469
- "split": f"{self.config.name}-test"
470
- },
471
- ),
472
- datasets.SplitGenerator(
473
- name=datasets.Split("TESTOOV"),
474
- gen_kwargs={
475
- "filepath": os.path.join(task_data_dir, f"dialog-babi-{self.config.name}-tst-OOV.txt"),
476
- "split": f"{self.config.name}-test-OOV"
477
- },
478
- )
479
- ]
480
-
481
- def _generate_examples(self, filepath, split):
482
- with open(filepath, encoding="utf-8") as f:
483
- dialogue_rows = []
484
- dialogue_id = 1
485
-
486
- for row in f:
487
- turn = row.strip()
488
- if not turn:
489
- yield self._format_dialogue(dialogue_id,split, dialogue_rows)
490
- dialogue_rows.clear()
491
- dialogue_id += 1
492
- else:
493
- dialogue_rows.append(turn)
494
-
495
- if dialogue_rows:
496
- yield self._format_dialogue(dialogue_id, split, dialogue_rows)
497
-
498
- def _format_dialogue(self, dialogue_id, split, dialogue_rows):
499
-
500
- user_turns = []
501
- system_turns = []
502
- kb_facts = []
503
-
504
- for turn_id, turn in enumerate(dialogue_rows):
505
- if "\t" not in turn:
506
- kb_facts.append({"turn_id": turn_id, "fact": turn})
507
- else:
508
- rest_turn, sys_turn = turn.split("\t")
509
- _, user_turn = rest_turn.split(" ", 1)
510
- user_turns.append(user_turn)
511
- system_turns.append(sys_turn)
512
-
513
-
514
- example_key = f"{split}-{dialogue_id}"
515
-
516
- dialogue_dict = {
517
- "user_turns": user_turns,
518
- "system_turns": system_turns
519
- }
520
-
521
- if self.config.name in self.CONFIGS_WITH_KB:
522
- dialogue_dict["kb_facts"] = kb_facts
523
-
524
- return example_key, dialogue_dict
525
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
task1-API-calls/dialog_babi-TESTOOV.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b8036b09f3569740b3575421267e9ae4c79d652a3431e738b6d46746a361e6e
3
+ size 27497
task1-API-calls/dialog_babi-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9889eaca7f862690e7058be12625a37244d90f84bb42991361d045219caab7e9
3
+ size 27605
task1-API-calls/dialog_babi-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:11e86b1348b5518aea36f6bd74ba50979a7938fe04c61e4826bb87e6ecae350c
3
+ size 27301
task1-API-calls/dialog_babi-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2207c1653decc1e458ac335a1f0c9c3b378ab6b06c533351a588d6aa75cdbf12
3
+ size 27032
task2-API-refine/dialog_babi-TESTOOV.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c344e50c1012a4fecc57a03ddb6cd3704749ffde9b92b2a19e04f763ae8643a
3
+ size 46227
task2-API-refine/dialog_babi-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c19177d7aa2a1d8d9fa1562465d8ea92532bd57c27b3634a2fbe218994da194
3
+ size 45522
task2-API-refine/dialog_babi-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:64818c0a73c384eb6403e807028908daacc80cc118e00eac94d9563d45c7af49
3
+ size 45807
task2-API-refine/dialog_babi-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9295c4569d89ce38978b90e1a7b374a82c0553749f7c01c3d1df2362667b7e58
3
+ size 45616
task3-options/dialog_babi-TESTOOV.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:842ff815288567897046cd55ed43f10c56641d58ac61d65a35f7cd196832a9f7
3
+ size 100462
task3-options/dialog_babi-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:00c5eb9129cf9e0be918beedaf30d56f6f8be8d84bd386a5d6eade5906f6cca8
3
+ size 75065
task3-options/dialog_babi-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc4896c0a6eb32f184e2ebd3c4efe60427008ffbcc0710046a3d6962bb2ed255
3
+ size 112656
task3-options/dialog_babi-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:153721b99d59d610ce31ff785fe6eba96b2f39454395f169af960c6a2047b479
3
+ size 74715
task4-phone-address/dialog_babi-TESTOOV.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:823d7e8b39638828260788c983e7cd2d4f24792a01b912f5590cff95ccd88683
3
+ size 57039
task4-phone-address/dialog_babi-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f9528ecd7783b35319bf23e08699955691cc3e8a3ea2d8695c38a4076b1322d2
3
+ size 55324
task4-phone-address/dialog_babi-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:abbfd6f556c2e3fca9445b5e21b45784aec128586fa8318a3e95aa953a2af8e2
3
+ size 61602
task4-phone-address/dialog_babi-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:699b26637d8d863cfa301712417d48d665a5d03c02a0e0ef32e93191fd4e4402
3
+ size 55321
task5-full-dialogs/dialog_babi-TESTOOV.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f7710e218ec905441633dfe1e8f7cdffd761f78ec935c9a57121a7a86169303
3
+ size 271661
task5-full-dialogs/dialog_babi-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a301f57e0517e32ea30965f5ff9564eac99b084437f04db78ff11a510c035c47
3
+ size 261373
task5-full-dialogs/dialog_babi-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:585fc95aa2c86b503bd5d70ae944f6c92ade7dc5fc42813e9df4799602025ae0
3
+ size 261983
task5-full-dialogs/dialog_babi-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e0d323944913a20042da8da4f0663db795edd1beb435ee08aff01ba112ce0fc1
3
+ size 268945
task6-dstc2/dialog_babi-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c5d0c9195a65d7f2b74bf56b7893baf1603ad21932fd8bf3d0242a642b362300
3
+ size 90448
task6-dstc2/dialog_babi-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cbc7b3116bed07bee621b952db66199d6525ba71b4341bc124ad179f00311792
3
+ size 120548
task6-dstc2/dialog_babi-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f69ecf030661db082d1995671c839c9b1b2aeed4ecd3f99c967f24fa6f3f200c
3
+ size 40068