system HF staff commited on
Commit
71c3f81
0 Parent(s):

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.0

.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,402 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - found
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - ace
8
+ - af
9
+ - ak
10
+ - am
11
+ - an
12
+ - ang
13
+ - ar
14
+ - ar_SY
15
+ - ary
16
+ - as
17
+ - ast
18
+ - az
19
+ - ba
20
+ - bal
21
+ - be
22
+ - bem
23
+ - ber
24
+ - bg
25
+ - bho
26
+ - bn
27
+ - bn_IN
28
+ - bo
29
+ - br
30
+ - brx
31
+ - bs
32
+ - bua
33
+ - byn
34
+ - ca
35
+ - ce
36
+ - ceb
37
+ - chr
38
+ - ckb
39
+ - co
40
+ - crh
41
+ - cs
42
+ - csb
43
+ - cv
44
+ - cy
45
+ - da
46
+ - de
47
+ - de_AT
48
+ - de_DE
49
+ - dsb
50
+ - dv
51
+ - dz
52
+ - el
53
+ - en
54
+ - en_AU
55
+ - en_CA
56
+ - en_GB
57
+ - en_NZ
58
+ - en_US
59
+ - eo
60
+ - es
61
+ - es_AR
62
+ - es_CL
63
+ - es_CO
64
+ - es_CR
65
+ - es_DO
66
+ - es_EC
67
+ - es_ES
68
+ - es_GT
69
+ - es_HN
70
+ - es_MX
71
+ - es_NI
72
+ - es_PA
73
+ - es_PE
74
+ - es_PR
75
+ - es_SV
76
+ - es_UY
77
+ - es_VE
78
+ - et
79
+ - eu
80
+ - fa
81
+ - fa_AF
82
+ - ff
83
+ - fi
84
+ - fil
85
+ - fo
86
+ - fr
87
+ - fr_CA
88
+ - fr_FR
89
+ - frm
90
+ - frp
91
+ - fur
92
+ - fy
93
+ - ga
94
+ - gd
95
+ - gl
96
+ - gn
97
+ - grc
98
+ - gu
99
+ - guc
100
+ - gv
101
+ - ha
102
+ - haw
103
+ - he
104
+ - hi
105
+ - hil
106
+ - hne
107
+ - hr
108
+ - hsb
109
+ - ht
110
+ - hu
111
+ - hy
112
+ - ia
113
+ - id
114
+ - ig
115
+ - io
116
+ - is
117
+ - it
118
+ - iu
119
+ - ja
120
+ - jbo
121
+ - jv
122
+ - ka
123
+ - kab
124
+ - kg
125
+ - kk
126
+ - kl
127
+ - km
128
+ - kn
129
+ - ko
130
+ - kok
131
+ - ks
132
+ - ksh
133
+ - ku
134
+ - kw
135
+ - ky
136
+ - la
137
+ - lb
138
+ - lg
139
+ - li
140
+ - lij
141
+ - lld
142
+ - ln
143
+ - lo
144
+ - lt
145
+ - ltg
146
+ - lv
147
+ - mai
148
+ - mg
149
+ - mh
150
+ - mhr
151
+ - mi
152
+ - miq
153
+ - mk
154
+ - ml
155
+ - mn
156
+ - mo
157
+ - mr
158
+ - ms
159
+ - mt
160
+ - mus
161
+ - my
162
+ - nan
163
+ - nap
164
+ - nb
165
+ - nds
166
+ - ne
167
+ - nhn
168
+ - nl
169
+ - nl_NL
170
+ - nn
171
+ - n/o
172
+ - nso
173
+ - ny
174
+ - oc
175
+ - oj
176
+ - om
177
+ - or
178
+ - os
179
+ - pa
180
+ - pam
181
+ - pap
182
+ - pl
183
+ - pms
184
+ - pmy
185
+ - ps
186
+ - pt
187
+ - pt_BR
188
+ - pt_PT
189
+ - qu
190
+ - rm
191
+ - ro
192
+ - rom
193
+ - ru
194
+ - rw
195
+ - sa
196
+ - sc
197
+ - sco
198
+ - sd
199
+ - se
200
+ - shn
201
+ - shs
202
+ - si
203
+ - sk
204
+ - sl
205
+ - sm
206
+ - sml
207
+ - sn
208
+ - so
209
+ - son
210
+ - sq
211
+ - sr
212
+ - st
213
+ - sv
214
+ - sw
215
+ - syr
216
+ - szl
217
+ - ta
218
+ - ta_LK
219
+ - te
220
+ - tet
221
+ - tg
222
+ - th
223
+ - ti
224
+ - tk
225
+ - tl
226
+ - tlh
227
+ - tr
228
+ - trv
229
+ - ts
230
+ - tt
231
+ - ug
232
+ - uk
233
+ - ur
234
+ - uz
235
+ - ve
236
+ - vec
237
+ - vi
238
+ - wa
239
+ - wae
240
+ - wo
241
+ - xal
242
+ - xh
243
+ - yi
244
+ - yo
245
+ - zh
246
+ - zh_CN
247
+ - zh_HK
248
+ - zh_TW
249
+ - zu
250
+ - zza
251
+ licenses:
252
+ - unknown
253
+ multilinguality:
254
+ - multilingual
255
+ size_categories:
256
+ - 10K<n<100K
257
+ source_datasets:
258
+ - original
259
+ task_categories:
260
+ - conditional-text-generation
261
+ task_ids:
262
+ - machine-translation
263
+ ---
264
+
265
+ # Dataset Card Creation Guide
266
+
267
+ ## Table of Contents
268
+ - [Dataset Description](#dataset-description)
269
+ - [Dataset Summary](#dataset-summary)
270
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
271
+ - [Languages](#languages)
272
+ - [Dataset Structure](#dataset-structure)
273
+ - [Data Instances](#data-instances)
274
+ - [Data Fields](#data-instances)
275
+ - [Data Splits](#data-instances)
276
+ - [Dataset Creation](#dataset-creation)
277
+ - [Curation Rationale](#curation-rationale)
278
+ - [Source Data](#source-data)
279
+ - [Annotations](#annotations)
280
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
281
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
282
+ - [Social Impact of Dataset](#social-impact-of-dataset)
283
+ - [Discussion of Biases](#discussion-of-biases)
284
+ - [Other Known Limitations](#other-known-limitations)
285
+ - [Additional Information](#additional-information)
286
+ - [Dataset Curators](#dataset-curators)
287
+ - [Licensing Information](#licensing-information)
288
+ - [Citation Information](#citation-information)
289
+
290
+ ## Dataset Description
291
+
292
+ - **Homepage:** http://opus.nlpl.eu/Ubuntu.php
293
+ - **Repository:** None
294
+ - **Paper:** http://www.lrec-conf.org/proceedings/lrec2012/pdf/463_Paper.pdf
295
+ - **Leaderboard:** [More Information Needed]
296
+ - **Point of Contact:** [More Information Needed]
297
+
298
+ ### Dataset Summary
299
+
300
+
301
+ To load a language pair which isn't part of the config, all you need to do is specify the language code as pairs.
302
+ You can find the valid pairs in Homepage section of Dataset Description: http://opus.nlpl.eu/Ubuntu.php
303
+ E.g.
304
+
305
+ `dataset = load_dataset("ubuntu", lang1="it", lang2="pl")`
306
+
307
+
308
+ ### Supported Tasks and Leaderboards
309
+
310
+ [More Information Needed]
311
+
312
+ ### Languages
313
+
314
+ [More Information Needed]
315
+
316
+ ## Dataset Structure
317
+
318
+ ### Data Instances
319
+
320
+ [More Information Needed]
321
+
322
+ ### Data Fields
323
+
324
+ [More Information Needed]
325
+
326
+ ### Data Splits
327
+
328
+ [More Information Needed]
329
+
330
+ ## Dataset Creation
331
+
332
+ ### Curation Rationale
333
+
334
+ [More Information Needed]
335
+
336
+ ### Source Data
337
+
338
+ [More Information Needed]
339
+
340
+ #### Initial Data Collection and Normalization
341
+
342
+ [More Information Needed]
343
+
344
+ #### Who are the source language producers?
345
+
346
+ [More Information Needed]
347
+
348
+ ### Annotations
349
+
350
+ [More Information Needed]
351
+
352
+ #### Annotation process
353
+
354
+ [More Information Needed]
355
+
356
+ #### Who are the annotators?
357
+
358
+ [More Information Needed]
359
+
360
+ ### Personal and Sensitive Information
361
+
362
+ [More Information Needed]
363
+
364
+ ## Considerations for Using the Data
365
+
366
+ ### Social Impact of Dataset
367
+
368
+ [More Information Needed]
369
+
370
+ ### Discussion of Biases
371
+
372
+ [More Information Needed]
373
+
374
+ ### Other Known Limitations
375
+
376
+ [More Information Needed]
377
+
378
+ ## Additional Information
379
+
380
+ ### Dataset Curators
381
+
382
+ [More Information Needed]
383
+
384
+ ### Licensing Information
385
+
386
+ [More Information Needed]
387
+
388
+ ### Citation Information
389
+
390
+ @InProceedings{TIEDEMANN12.463,
391
+ author = {J{\"o}rg Tiedemann},
392
+ title = {Parallel Data, Tools and Interfaces in OPUS},
393
+ booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)},
394
+ year = {2012},
395
+ month = {may},
396
+ date = {23-25},
397
+ address = {Istanbul, Turkey},
398
+ editor = {Nicoletta Calzolari (Conference Chair) and Khalid Choukri and Thierry Declerck and Mehmet Ugur Dogan and Bente Maegaard and Joseph Mariani and Jan Odijk and Stelios Piperidis},
399
+ publisher = {European Language Resources Association (ELRA)},
400
+ isbn = {978-2-9517408-7-7},
401
+ language = {english}
402
+ }
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"as-bs": {"description": "A parallel corpus of Ubuntu localization files. Source: https://translations.launchpad.net\n244 languages, 23,988 bitexts\ntotal number of files: 30,959\ntotal number of tokens: 29.84M\ntotal number of sentence fragments: 7.73M\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J\ufffdrg Tiedemann},\n title = {Parallel Data, Tools and Interfaces in OPUS},\n booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)},\n year = {2012},\n month = {may},\n date = {23-25},\n address = {Istanbul, Turkey},\n editor = {Nicoletta Calzolari (Conference Chair) and Khalid Choukri and Thierry Declerck and Mehmet Ugur Dogan and Bente Maegaard and Joseph Mariani and Jan Odijk and Stelios Piperidis},\n publisher = {European Language Resources Association (ELRA)},\n isbn = {978-2-9517408-7-7},\n language = {english}\n }\n", "homepage": "http://opus.nlpl.eu/Ubuntu.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["as", "bs"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_ubuntu", "config_name": "as-bs", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1037811, "num_examples": 8583, "dataset_name": "opus_ubuntu"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-Ubuntu/v14.10/moses/as-bs.txt.zip": {"num_bytes": 229723, "checksum": "c161c28a947125784b1c0ac5077078a56e884fed2837d31d445eb4af9dafc2d0"}}, "download_size": 229723, "post_processing_size": null, "dataset_size": 1037811, "size_in_bytes": 1267534}, "az-cs": {"description": "A parallel corpus of Ubuntu localization files. Source: https://translations.launchpad.net\n244 languages, 23,988 bitexts\ntotal number of files: 30,959\ntotal number of tokens: 29.84M\ntotal number of sentence fragments: 7.73M\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J\ufffdrg Tiedemann},\n title = {Parallel Data, Tools and Interfaces in OPUS},\n booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)},\n year = {2012},\n month = {may},\n date = {23-25},\n address = {Istanbul, Turkey},\n editor = {Nicoletta Calzolari (Conference Chair) and Khalid Choukri and Thierry Declerck and Mehmet Ugur Dogan and Bente Maegaard and Joseph Mariani and Jan Odijk and Stelios Piperidis},\n publisher = {European Language Resources Association (ELRA)},\n isbn = {978-2-9517408-7-7},\n language = {english}\n }\n", "homepage": "http://opus.nlpl.eu/Ubuntu.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["az", "cs"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_ubuntu", "config_name": "az-cs", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 17821, "num_examples": 293, "dataset_name": "opus_ubuntu"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-Ubuntu/v14.10/moses/az-cs.txt.zip": {"num_bytes": 9501, "checksum": "b4986820df296b519e225d8083ead1ce60fed986207d8cb5b448ffee56a175e6"}}, "download_size": 9501, "post_processing_size": null, "dataset_size": 17821, "size_in_bytes": 27322}, "bg-de": {"description": "A parallel corpus of Ubuntu localization files. Source: https://translations.launchpad.net\n244 languages, 23,988 bitexts\ntotal number of files: 30,959\ntotal number of tokens: 29.84M\ntotal number of sentence fragments: 7.73M\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J\ufffdrg Tiedemann},\n title = {Parallel Data, Tools and Interfaces in OPUS},\n booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)},\n year = {2012},\n month = {may},\n date = {23-25},\n address = {Istanbul, Turkey},\n editor = {Nicoletta Calzolari (Conference Chair) and Khalid Choukri and Thierry Declerck and Mehmet Ugur Dogan and Bente Maegaard and Joseph Mariani and Jan Odijk and Stelios Piperidis},\n publisher = {European Language Resources Association (ELRA)},\n isbn = {978-2-9517408-7-7},\n language = {english}\n }\n", "homepage": "http://opus.nlpl.eu/Ubuntu.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["bg", "de"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_ubuntu", "config_name": "bg-de", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 27627, "num_examples": 184, "dataset_name": "opus_ubuntu"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-Ubuntu/v14.10/moses/bg-de.txt.zip": {"num_bytes": 9994, "checksum": "2dabaefcd9ca11ba6a315fc2e208682ff478655c34ce80a1bceff49b58abf896"}}, "download_size": 9994, "post_processing_size": null, "dataset_size": 27627, "size_in_bytes": 37621}, "br-es_PR": {"description": "A parallel corpus of Ubuntu localization files. Source: https://translations.launchpad.net\n244 languages, 23,988 bitexts\ntotal number of files: 30,959\ntotal number of tokens: 29.84M\ntotal number of sentence fragments: 7.73M\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J\ufffdrg Tiedemann},\n title = {Parallel Data, Tools and Interfaces in OPUS},\n booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)},\n year = {2012},\n month = {may},\n date = {23-25},\n address = {Istanbul, Turkey},\n editor = {Nicoletta Calzolari (Conference Chair) and Khalid Choukri and Thierry Declerck and Mehmet Ugur Dogan and Bente Maegaard and Joseph Mariani and Jan Odijk and Stelios Piperidis},\n publisher = {European Language Resources Association (ELRA)},\n isbn = {978-2-9517408-7-7},\n language = {english}\n }\n", "homepage": "http://opus.nlpl.eu/Ubuntu.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["br", "es_PR"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_ubuntu", "config_name": "br-es_PR", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 8875, "num_examples": 125, "dataset_name": "opus_ubuntu"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-Ubuntu/v14.10/moses/br-es_PR.txt.zip": {"num_bytes": 5494, "checksum": "fe84c9308d4cbea7cf05fa7202a6a8018983e9cf150d0cbfa6954c2713d879c9"}}, "download_size": 5494, "post_processing_size": null, "dataset_size": 8875, "size_in_bytes": 14369}, "bn-ga": {"description": "A parallel corpus of Ubuntu localization files. Source: https://translations.launchpad.net\n244 languages, 23,988 bitexts\ntotal number of files: 30,959\ntotal number of tokens: 29.84M\ntotal number of sentence fragments: 7.73M\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J\ufffdrg Tiedemann},\n title = {Parallel Data, Tools and Interfaces in OPUS},\n booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)},\n year = {2012},\n month = {may},\n date = {23-25},\n address = {Istanbul, Turkey},\n editor = {Nicoletta Calzolari (Conference Chair) and Khalid Choukri and Thierry Declerck and Mehmet Ugur Dogan and Bente Maegaard and Joseph Mariani and Jan Odijk and Stelios Piperidis},\n publisher = {European Language Resources Association (ELRA)},\n isbn = {978-2-9517408-7-7},\n language = {english}\n }\n", "homepage": "http://opus.nlpl.eu/Ubuntu.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["bn", "ga"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_ubuntu", "config_name": "bn-ga", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 584629, "num_examples": 7324, "dataset_name": "opus_ubuntu"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-Ubuntu/v14.10/moses/bn-ga.txt.zip": {"num_bytes": 142710, "checksum": "427fc72ef91e720fe3b322118313cdc35dc0e6867d6b0bb21f798770964113f0"}}, "download_size": 142710, "post_processing_size": null, "dataset_size": 584629, "size_in_bytes": 727339}, "br-hi": {"description": "A parallel corpus of Ubuntu localization files. Source: https://translations.launchpad.net\n244 languages, 23,988 bitexts\ntotal number of files: 30,959\ntotal number of tokens: 29.84M\ntotal number of sentence fragments: 7.73M\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J\ufffdrg Tiedemann},\n title = {Parallel Data, Tools and Interfaces in OPUS},\n booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)},\n year = {2012},\n month = {may},\n date = {23-25},\n address = {Istanbul, Turkey},\n editor = {Nicoletta Calzolari (Conference Chair) and Khalid Choukri and Thierry Declerck and Mehmet Ugur Dogan and Bente Maegaard and Joseph Mariani and Jan Odijk and Stelios Piperidis},\n publisher = {European Language Resources Association (ELRA)},\n isbn = {978-2-9517408-7-7},\n language = {english}\n }\n", "homepage": "http://opus.nlpl.eu/Ubuntu.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["br", "hi"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_ubuntu", "config_name": "br-hi", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1300081, "num_examples": 15551, "dataset_name": "opus_ubuntu"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-Ubuntu/v14.10/moses/br-hi.txt.zip": {"num_bytes": 325415, "checksum": "ce9f786a4580eec408c98315c42c1bcce2b6b2ebe5e56a357bc7542ecbc3a21d"}}, "download_size": 325415, "post_processing_size": null, "dataset_size": 1300081, "size_in_bytes": 1625496}, "br-la": {"description": "A parallel corpus of Ubuntu localization files. Source: https://translations.launchpad.net\n244 languages, 23,988 bitexts\ntotal number of files: 30,959\ntotal number of tokens: 29.84M\ntotal number of sentence fragments: 7.73M\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J\ufffdrg Tiedemann},\n title = {Parallel Data, Tools and Interfaces in OPUS},\n booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)},\n year = {2012},\n month = {may},\n date = {23-25},\n address = {Istanbul, Turkey},\n editor = {Nicoletta Calzolari (Conference Chair) and Khalid Choukri and Thierry Declerck and Mehmet Ugur Dogan and Bente Maegaard and Joseph Mariani and Jan Odijk and Stelios Piperidis},\n publisher = {European Language Resources Association (ELRA)},\n isbn = {978-2-9517408-7-7},\n language = {english}\n }\n", "homepage": "http://opus.nlpl.eu/Ubuntu.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["br", "la"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_ubuntu", "config_name": "br-la", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 29341, "num_examples": 527, "dataset_name": "opus_ubuntu"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-Ubuntu/v14.10/moses/br-la.txt.zip": {"num_bytes": 11565, "checksum": "5c16d6cda06ecd2c57c20a67ffba20bc0b4a0e211827481dad2f913b3d54c0e5"}}, "download_size": 11565, "post_processing_size": null, "dataset_size": 29341, "size_in_bytes": 40906}, "bs-szl": {"description": "A parallel corpus of Ubuntu localization files. Source: https://translations.launchpad.net\n244 languages, 23,988 bitexts\ntotal number of files: 30,959\ntotal number of tokens: 29.84M\ntotal number of sentence fragments: 7.73M\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J\ufffdrg Tiedemann},\n title = {Parallel Data, Tools and Interfaces in OPUS},\n booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)},\n year = {2012},\n month = {may},\n date = {23-25},\n address = {Istanbul, Turkey},\n editor = {Nicoletta Calzolari (Conference Chair) and Khalid Choukri and Thierry Declerck and Mehmet Ugur Dogan and Bente Maegaard and Joseph Mariani and Jan Odijk and Stelios Piperidis},\n publisher = {European Language Resources Association (ELRA)},\n isbn = {978-2-9517408-7-7},\n language = {english}\n }\n", "homepage": "http://opus.nlpl.eu/Ubuntu.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["bs", "szl"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_ubuntu", "config_name": "bs-szl", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 41116, "num_examples": 646, "dataset_name": "opus_ubuntu"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-Ubuntu/v14.10/moses/bs-szl.txt.zip": {"num_bytes": 18134, "checksum": "39f0daeb68d222720f230d775561dca60fcae4a15ad40d7364ad6a2332d94171"}}, "download_size": 18134, "post_processing_size": null, "dataset_size": 41116, "size_in_bytes": 59250}, "br-uz": {"description": "A parallel corpus of Ubuntu localization files. Source: https://translations.launchpad.net\n244 languages, 23,988 bitexts\ntotal number of files: 30,959\ntotal number of tokens: 29.84M\ntotal number of sentence fragments: 7.73M\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J\ufffdrg Tiedemann},\n title = {Parallel Data, Tools and Interfaces in OPUS},\n booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)},\n year = {2012},\n month = {may},\n date = {23-25},\n address = {Istanbul, Turkey},\n editor = {Nicoletta Calzolari (Conference Chair) and Khalid Choukri and Thierry Declerck and Mehmet Ugur Dogan and Bente Maegaard and Joseph Mariani and Jan Odijk and Stelios Piperidis},\n publisher = {European Language Resources Association (ELRA)},\n isbn = {978-2-9517408-7-7},\n language = {english}\n }\n", "homepage": "http://opus.nlpl.eu/Ubuntu.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["br", "uz"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_ubuntu", "config_name": "br-uz", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 110278, "num_examples": 1416, "dataset_name": "opus_ubuntu"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-Ubuntu/v14.10/moses/br-uz.txt.zip": {"num_bytes": 33595, "checksum": "69f3c1a90c2f2d97590b82ed5cbded98a4f003f32fa54f891a568760042c781b"}}, "download_size": 33595, "post_processing_size": null, "dataset_size": 110278, "size_in_bytes": 143873}, "br-yi": {"description": "A parallel corpus of Ubuntu localization files. Source: https://translations.launchpad.net\n244 languages, 23,988 bitexts\ntotal number of files: 30,959\ntotal number of tokens: 29.84M\ntotal number of sentence fragments: 7.73M\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J\ufffdrg Tiedemann},\n title = {Parallel Data, Tools and Interfaces in OPUS},\n booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)},\n year = {2012},\n month = {may},\n date = {23-25},\n address = {Istanbul, Turkey},\n editor = {Nicoletta Calzolari (Conference Chair) and Khalid Choukri and Thierry Declerck and Mehmet Ugur Dogan and Bente Maegaard and Joseph Mariani and Jan Odijk and Stelios Piperidis},\n publisher = {European Language Resources Association (ELRA)},\n isbn = {978-2-9517408-7-7},\n language = {english}\n }\n", "homepage": "http://opus.nlpl.eu/Ubuntu.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["br", "yi"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_ubuntu", "config_name": "br-yi", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 172846, "num_examples": 2799, "dataset_name": "opus_ubuntu"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-Ubuntu/v14.10/moses/br-yi.txt.zip": {"num_bytes": 41956, "checksum": "74941bbd3cda94ad0e6446a3bc2213c4068d85a7bcd953889d963a1816716c46"}}, "download_size": 41956, "post_processing_size": null, "dataset_size": 172846, "size_in_bytes": 214802}}
dummy/as-bs/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7055f4d817162b5076c1d8ce959696ebd89f36c5f5decda869f684e2ab25cb0e
3
+ size 1167
dummy/az-cs/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a5d018bf83bfd058882bbce0e6cc99ac5165705f152bb4dc053c5110c0657761
3
+ size 1220
dummy/bg-de/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:879640c2738d6f31fd717b41f047833d7efd9c98de488c7b547398b95e20e68f
3
+ size 1107
dummy/bn-ga/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58c5250d1a0b62725f11e2d5cb69b363fb1b4c344d7e8b9c1b8dfc963f81cfa1
3
+ size 1116
dummy/br-es_PR/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d41c62f98d99d085a63f7888f3796fd664677dc290a676141ecedc5efe49b1f
3
+ size 1129
dummy/br-hi/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:70e06f0c78313017e4e23a5dbf65e68fb4b327fa721f1e06e0982c94191dd92c
3
+ size 1207
dummy/br-la/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c1f1bb8a54dcd84a898f758f9bbae3e1b5594d6fef2167e0ffe3639c357bb040
3
+ size 996
dummy/br-uz/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9732bc36d026f9a51d83ad0411129d23304a670f9c60f51ccbd44997a9653f4c
3
+ size 1210
dummy/br-yi/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:97a4aa500fc6a4282de3474344b12c1e5cdd60da71568c4561af7e1633e19671
3
+ size 1028
dummy/bs-szl/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fcfd161bf8dbd6d87a295a2679c0119ee1947e1cb1f717fae3d7a951eae644a3
3
+ size 1016
opus_ubuntu.py ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 HuggingFace Datasets Authors.
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
+ # Lint as: python3
17
+ import os
18
+
19
+ import datasets
20
+
21
+
22
+ _DESCRIPTION = """\
23
+ A parallel corpus of Ubuntu localization files. Source: https://translations.launchpad.net
24
+ 244 languages, 23,988 bitexts
25
+ total number of files: 30,959
26
+ total number of tokens: 29.84M
27
+ total number of sentence fragments: 7.73M
28
+ """
29
+ _HOMEPAGE_URL = "http://opus.nlpl.eu/Ubuntu.php"
30
+ _CITATION = """\
31
+ @InProceedings{TIEDEMANN12.463,
32
+ author = {J{\"o}rg Tiedemann},
33
+ title = {Parallel Data, Tools and Interfaces in OPUS},
34
+ booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)},
35
+ year = {2012},
36
+ month = {may},
37
+ date = {23-25},
38
+ address = {Istanbul, Turkey},
39
+ editor = {Nicoletta Calzolari (Conference Chair) and Khalid Choukri and Thierry Declerck and Mehmet Ugur Dogan and Bente Maegaard and Joseph Mariani and Jan Odijk and Stelios Piperidis},
40
+ publisher = {European Language Resources Association (ELRA)},
41
+ isbn = {978-2-9517408-7-7},
42
+ language = {english}
43
+ }
44
+ """
45
+
46
+ _VERSION = "1.0.0"
47
+ _BASE_NAME = "Ubuntu.{}.{}"
48
+ _BASE_URL = "https://object.pouta.csc.fi/OPUS-Ubuntu/v14.10/moses/{}-{}.txt.zip"
49
+ # Please note that only few pairs are shown here. You can use config to generate data for all language pairs
50
+ _LANGUAGE_PAIRS = [
51
+ ("as", "bs"),
52
+ ("az", "cs"),
53
+ ("bg", "de"),
54
+ ("br", "es_PR"),
55
+ ("bn", "ga"),
56
+ ("br", "hi"),
57
+ ("br", "la"),
58
+ ("bs", "szl"),
59
+ ("br", "uz"),
60
+ ("br", "yi"),
61
+ ]
62
+
63
+
64
+ class UbuntuConfig(datasets.BuilderConfig):
65
+ def __init__(self, *args, lang1=None, lang2=None, **kwargs):
66
+ super().__init__(
67
+ *args,
68
+ name=f"{lang1}-{lang2}",
69
+ **kwargs,
70
+ )
71
+ self.lang1 = lang1
72
+ self.lang2 = lang2
73
+
74
+
75
+ class OpusUbuntu(datasets.GeneratorBasedBuilder):
76
+ BUILDER_CONFIGS = [
77
+ UbuntuConfig(
78
+ lang1=lang1,
79
+ lang2=lang2,
80
+ description=f"Translating {lang1} to {lang2} or vice versa",
81
+ version=datasets.Version(_VERSION),
82
+ )
83
+ for lang1, lang2 in _LANGUAGE_PAIRS
84
+ ]
85
+ BUILDER_CONFIG_CLASS = UbuntuConfig
86
+
87
+ def _info(self):
88
+ return datasets.DatasetInfo(
89
+ description=_DESCRIPTION,
90
+ features=datasets.Features(
91
+ {
92
+ "id": datasets.Value("string"),
93
+ "translation": datasets.Translation(languages=(self.config.lang1, self.config.lang2)),
94
+ },
95
+ ),
96
+ supervised_keys=None,
97
+ homepage=_HOMEPAGE_URL,
98
+ citation=_CITATION,
99
+ )
100
+
101
+ def _split_generators(self, dl_manager):
102
+ def _base_url(lang1, lang2):
103
+ return _BASE_URL.format(lang1, lang2)
104
+
105
+ download_url = _base_url(self.config.lang1, self.config.lang2)
106
+ path = dl_manager.download_and_extract(download_url)
107
+ return [
108
+ datasets.SplitGenerator(
109
+ name=datasets.Split.TRAIN,
110
+ gen_kwargs={"datapath": path},
111
+ )
112
+ ]
113
+
114
+ def _generate_examples(self, datapath):
115
+ l1, l2 = self.config.lang1, self.config.lang2
116
+ folder = l1 + "-" + l2
117
+ l1_file = _BASE_NAME.format(folder, l1)
118
+ l2_file = _BASE_NAME.format(folder, l2)
119
+ l1_path = os.path.join(datapath, l1_file)
120
+ l2_path = os.path.join(datapath, l2_file)
121
+ with open(l1_path, encoding="utf-8") as f1, open(l2_path, encoding="utf-8") as f2:
122
+ for sentence_counter, (x, y) in enumerate(zip(f1, f2)):
123
+ x = x.strip()
124
+ y = y.strip()
125
+ result = (
126
+ sentence_counter,
127
+ {
128
+ "id": str(sentence_counter),
129
+ "translation": {l1: x, l2: y},
130
+ },
131
+ )
132
+ yield result