Datasets:

ArXiv:
Guillaume Wenzek commited on
Commit
f883c6a
1 Parent(s): a6efe24

add ccmatrix bitext

Browse files
Files changed (2) hide show
  1. ccmatrix_lang_pairs.py +1199 -0
  2. nllb.py +84 -15
ccmatrix_lang_pairs.py ADDED
@@ -0,0 +1,1199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LANG_PAIRS = [
2
+ ("af", "da"),
3
+ ("af", "de"),
4
+ ("af", "en"),
5
+ ("af", "fy"),
6
+ ("af", "is"),
7
+ ("af", "lb"),
8
+ ("af", "nl"),
9
+ ("af", "no"),
10
+ ("af", "sv"),
11
+ ("af", "tr"),
12
+ ("af", "yi"),
13
+ ("am", "ha"),
14
+ ("am", "ig"),
15
+ ("am", "sw"),
16
+ ("am", "yo"),
17
+ ("ar", "az"),
18
+ ("ar", "bg"),
19
+ ("ar", "bn"),
20
+ ("ar", "ca"),
21
+ ("ar", "cs"),
22
+ ("ar", "da"),
23
+ ("ar", "de"),
24
+ ("ar", "el"),
25
+ ("ar", "en"),
26
+ ("ar", "eo"),
27
+ ("ar", "es"),
28
+ ("ar", "et"),
29
+ ("ar", "eu"),
30
+ ("ar", "fa"),
31
+ ("ar", "fi"),
32
+ ("ar", "fr"),
33
+ ("ar", "he"),
34
+ ("ar", "hi"),
35
+ ("ar", "hr"),
36
+ ("ar", "hu"),
37
+ ("ar", "hy"),
38
+ ("ar", "id"),
39
+ ("ar", "it"),
40
+ ("ar", "ja"),
41
+ ("ar", "ka"),
42
+ ("ar", "kk"),
43
+ ("ar", "km"),
44
+ ("ar", "ko"),
45
+ ("ar", "la"),
46
+ ("ar", "lg"),
47
+ ("ar", "lt"),
48
+ ("ar", "lv"),
49
+ ("ar", "ml"),
50
+ ("ar", "mr"),
51
+ ("ar", "ms"),
52
+ ("ar", "my"),
53
+ ("ar", "ne"),
54
+ ("ar", "nl"),
55
+ ("ar", "no"),
56
+ ("ar", "om"),
57
+ ("ar", "or"),
58
+ ("ar", "pl"),
59
+ ("ar", "pt"),
60
+ ("ar", "ro"),
61
+ ("ar", "ru"),
62
+ ("ar", "sd"),
63
+ ("ar", "si"),
64
+ ("ar", "sk"),
65
+ ("ar", "sl"),
66
+ ("ar", "sq"),
67
+ ("ar", "sr"),
68
+ ("ar", "sv"),
69
+ ("ar", "sw"),
70
+ ("ar", "ta"),
71
+ ("ar", "tl"),
72
+ ("ar", "tr"),
73
+ ("ar", "uk"),
74
+ ("ar", "ur"),
75
+ ("ar", "uz"),
76
+ ("ar", "vi"),
77
+ ("ar", "xh"),
78
+ ("ar", "zh"),
79
+ ("ar", "zu"),
80
+ ("ast", "ca"),
81
+ ("ast", "en"),
82
+ ("ast", "es"),
83
+ ("ast", "fr"),
84
+ ("ast", "gl"),
85
+ ("ast", "it"),
86
+ ("ast", "la"),
87
+ ("ast", "oc"),
88
+ ("ast", "pt"),
89
+ ("ast", "ro"),
90
+ ("az", "en"),
91
+ ("az", "hy"),
92
+ ("az", "id"),
93
+ ("az", "ka"),
94
+ ("az", "kk"),
95
+ ("az", "km"),
96
+ ("az", "my"),
97
+ ("az", "tr"),
98
+ ("az", "tt"),
99
+ ("az", "vi"),
100
+ ("be", "bg"),
101
+ ("be", "bn"),
102
+ ("be", "cs"),
103
+ ("be", "da"),
104
+ ("be", "de"),
105
+ ("be", "el"),
106
+ ("be", "en"),
107
+ ("be", "eo"),
108
+ ("be", "et"),
109
+ ("be", "fi"),
110
+ ("be", "hi"),
111
+ ("be", "hr"),
112
+ ("be", "hu"),
113
+ ("be", "it"),
114
+ ("be", "lt"),
115
+ ("be", "lv"),
116
+ ("be", "nl"),
117
+ ("be", "no"),
118
+ ("be", "pl"),
119
+ ("be", "ro"),
120
+ ("be", "ru"),
121
+ ("be", "sk"),
122
+ ("be", "sl"),
123
+ ("be", "sq"),
124
+ ("be", "sr"),
125
+ ("be", "sv"),
126
+ ("be", "sw"),
127
+ ("be", "tr"),
128
+ ("be", "uk"),
129
+ ("be", "vi"),
130
+ ("bg", "bn"),
131
+ ("bg", "ca"),
132
+ ("bg", "cs"),
133
+ ("bg", "da"),
134
+ ("bg", "de"),
135
+ ("bg", "el"),
136
+ ("bg", "en"),
137
+ ("bg", "eo"),
138
+ ("bg", "es"),
139
+ ("bg", "et"),
140
+ ("bg", "eu"),
141
+ ("bg", "fi"),
142
+ ("bg", "fr"),
143
+ ("bg", "he"),
144
+ ("bg", "hi"),
145
+ ("bg", "hr"),
146
+ ("bg", "hu"),
147
+ ("bg", "id"),
148
+ ("bg", "it"),
149
+ ("bg", "ja"),
150
+ ("bg", "ko"),
151
+ ("bg", "lt"),
152
+ ("bg", "lv"),
153
+ ("bg", "mk"),
154
+ ("bg", "nl"),
155
+ ("bg", "no"),
156
+ ("bg", "pl"),
157
+ ("bg", "pt"),
158
+ ("bg", "ro"),
159
+ ("bg", "ru"),
160
+ ("bg", "sk"),
161
+ ("bg", "sl"),
162
+ ("bg", "sq"),
163
+ ("bg", "sr"),
164
+ ("bg", "sv"),
165
+ ("bg", "sw"),
166
+ ("bg", "ta"),
167
+ ("bg", "tr"),
168
+ ("bg", "uk"),
169
+ ("bg", "vi"),
170
+ ("bg", "zh"),
171
+ ("bn", "ca"),
172
+ ("bn", "cs"),
173
+ ("bn", "de"),
174
+ ("bn", "el"),
175
+ ("bn", "en"),
176
+ ("bn", "eo"),
177
+ ("bn", "es"),
178
+ ("bn", "et"),
179
+ ("bn", "fa"),
180
+ ("bn", "fi"),
181
+ ("bn", "fr"),
182
+ ("bn", "he"),
183
+ ("bn", "hi"),
184
+ ("bn", "hu"),
185
+ ("bn", "id"),
186
+ ("bn", "il"),
187
+ ("bn", "it"),
188
+ ("bn", "ja"),
189
+ ("bn", "ko"),
190
+ ("bn", "la"),
191
+ ("bn", "lt"),
192
+ ("bn", "lv"),
193
+ ("bn", "mg"),
194
+ ("bn", "mk"),
195
+ ("bn", "ml"),
196
+ ("bn", "mr"),
197
+ ("bn", "ms"),
198
+ ("bn", "ne"),
199
+ ("bn", "nl"),
200
+ ("bn", "or"),
201
+ ("bn", "pl"),
202
+ ("bn", "pt"),
203
+ ("bn", "ro"),
204
+ ("bn", "ru"),
205
+ ("bn", "si"),
206
+ ("bn", "sk"),
207
+ ("bn", "sl"),
208
+ ("bn", "sr"),
209
+ ("bn", "sv"),
210
+ ("bn", "sw"),
211
+ ("bn", "ta"),
212
+ ("bn", "tl"),
213
+ ("bn", "tr"),
214
+ ("bn", "uk"),
215
+ ("bn", "ur"),
216
+ ("bn", "vi"),
217
+ ("bn", "zh"),
218
+ ("br", "en"),
219
+ ("br", "nl"),
220
+ ("ca", "da"),
221
+ ("ca", "el"),
222
+ ("ca", "en"),
223
+ ("ca", "eo"),
224
+ ("ca", "es"),
225
+ ("ca", "et"),
226
+ ("ca", "eu"),
227
+ ("ca", "fa"),
228
+ ("ca", "fi"),
229
+ ("ca", "fr"),
230
+ ("ca", "gl"),
231
+ ("ca", "he"),
232
+ ("ca", "hi"),
233
+ ("ca", "hu"),
234
+ ("ca", "id"),
235
+ ("ca", "it"),
236
+ ("ca", "la"),
237
+ ("ca", "lt"),
238
+ ("ca", "lv"),
239
+ ("ca", "no"),
240
+ ("ca", "oc"),
241
+ ("ca", "pt"),
242
+ ("ca", "ro"),
243
+ ("ca", "sk"),
244
+ ("ca", "sl"),
245
+ ("ca", "sq"),
246
+ ("ca", "sr"),
247
+ ("ca", "sw"),
248
+ ("ca", "ta"),
249
+ ("ca", "uk"),
250
+ ("ceb", "de"),
251
+ ("ceb", "en"),
252
+ ("ceb", "hi"),
253
+ ("ceb", "id"),
254
+ ("ceb", "il"),
255
+ ("ceb", "ja"),
256
+ ("ceb", "jv"),
257
+ ("ceb", "mg"),
258
+ ("ceb", "ml"),
259
+ ("ceb", "ms"),
260
+ ("ceb", "su"),
261
+ ("ceb", "tl"),
262
+ ("cs", "da"),
263
+ ("cs", "de"),
264
+ ("cs", "el"),
265
+ ("cs", "en"),
266
+ ("cs", "eo"),
267
+ ("cs", "es"),
268
+ ("cs", "et"),
269
+ ("cs", "fa"),
270
+ ("cs", "fi"),
271
+ ("cs", "fr"),
272
+ ("cs", "he"),
273
+ ("cs", "hi"),
274
+ ("cs", "hr"),
275
+ ("cs", "hu"),
276
+ ("cs", "id"),
277
+ ("cs", "it"),
278
+ ("cs", "ja"),
279
+ ("cs", "ko"),
280
+ ("cs", "lt"),
281
+ ("cs", "lv"),
282
+ ("cs", "mk"),
283
+ ("cs", "nl"),
284
+ ("cs", "no"),
285
+ ("cs", "pl"),
286
+ ("cs", "pt"),
287
+ ("cs", "ro"),
288
+ ("cs", "ru"),
289
+ ("cs", "sk"),
290
+ ("cs", "sl"),
291
+ ("cs", "sq"),
292
+ ("cs", "sr"),
293
+ ("cs", "sv"),
294
+ ("cs", "sw"),
295
+ ("cs", "ta"),
296
+ ("cs", "tr"),
297
+ ("cs", "uk"),
298
+ ("cs", "vi"),
299
+ ("cs", "zh"),
300
+ ("cy", "nl"),
301
+ ("da", "de"),
302
+ ("da", "el"),
303
+ ("da", "en"),
304
+ ("da", "eo"),
305
+ ("da", "es"),
306
+ ("da", "et"),
307
+ ("da", "eu"),
308
+ ("da", "fa"),
309
+ ("da", "fi"),
310
+ ("da", "fr"),
311
+ ("da", "fy"),
312
+ ("da", "gd"),
313
+ ("da", "he"),
314
+ ("da", "hr"),
315
+ ("da", "hu"),
316
+ ("da", "id"),
317
+ ("da", "is"),
318
+ ("da", "it"),
319
+ ("da", "ja"),
320
+ ("da", "ko"),
321
+ ("da", "lb"),
322
+ ("da", "lt"),
323
+ ("da", "lv"),
324
+ ("da", "mk"),
325
+ ("da", "nl"),
326
+ ("da", "no"),
327
+ ("da", "pl"),
328
+ ("da", "pt"),
329
+ ("da", "ro"),
330
+ ("da", "ru"),
331
+ ("da", "sk"),
332
+ ("da", "sl"),
333
+ ("da", "sq"),
334
+ ("da", "sr"),
335
+ ("da", "sv"),
336
+ ("da", "ta"),
337
+ ("da", "tr"),
338
+ ("da", "uk"),
339
+ ("da", "vi"),
340
+ ("da", "yi"),
341
+ ("da", "zh"),
342
+ ("de", "el"),
343
+ ("de", "en"),
344
+ ("de", "eo"),
345
+ ("de", "es"),
346
+ ("de", "et"),
347
+ ("de", "fa"),
348
+ ("de", "fi"),
349
+ ("de", "fr"),
350
+ ("de", "fy"),
351
+ ("de", "ha"),
352
+ ("de", "he"),
353
+ ("de", "hi"),
354
+ ("de", "hr"),
355
+ ("de", "hu"),
356
+ ("de", "id"),
357
+ ("de", "il"),
358
+ ("de", "is"),
359
+ ("de", "it"),
360
+ ("de", "ja"),
361
+ ("de", "jv"),
362
+ ("de", "ko"),
363
+ ("de", "lb"),
364
+ ("de", "lt"),
365
+ ("de", "lv"),
366
+ ("de", "mg"),
367
+ ("de", "mk"),
368
+ ("de", "ml"),
369
+ ("de", "ms"),
370
+ ("de", "nl"),
371
+ ("de", "no"),
372
+ ("de", "pl"),
373
+ ("de", "pt"),
374
+ ("de", "ro"),
375
+ ("de", "ru"),
376
+ ("de", "sk"),
377
+ ("de", "sl"),
378
+ ("de", "sq"),
379
+ ("de", "sr"),
380
+ ("de", "su"),
381
+ ("de", "sv"),
382
+ ("de", "sw"),
383
+ ("de", "ta"),
384
+ ("de", "tl"),
385
+ ("de", "tr"),
386
+ ("de", "uk"),
387
+ ("de", "vi"),
388
+ ("de", "yi"),
389
+ ("de", "yo"),
390
+ ("de", "zh"),
391
+ ("el", "en"),
392
+ ("el", "eo"),
393
+ ("el", "es"),
394
+ ("el", "et"),
395
+ ("el", "eu"),
396
+ ("el", "fa"),
397
+ ("el", "fi"),
398
+ ("el", "fr"),
399
+ ("el", "he"),
400
+ ("el", "hi"),
401
+ ("el", "hu"),
402
+ ("el", "id"),
403
+ ("el", "it"),
404
+ ("el", "ja"),
405
+ ("el", "ko"),
406
+ ("el", "la"),
407
+ ("el", "lt"),
408
+ ("el", "lv"),
409
+ ("el", "nl"),
410
+ ("el", "no"),
411
+ ("el", "pl"),
412
+ ("el", "pt"),
413
+ ("el", "ro"),
414
+ ("el", "ru"),
415
+ ("el", "sk"),
416
+ ("el", "sl"),
417
+ ("el", "sq"),
418
+ ("el", "sr"),
419
+ ("el", "sv"),
420
+ ("el", "sw"),
421
+ ("el", "ta"),
422
+ ("el", "tr"),
423
+ ("el", "uk"),
424
+ ("el", "vi"),
425
+ ("el", "zh"),
426
+ ("en", "eo"),
427
+ ("en", "es"),
428
+ ("en", "et"),
429
+ ("en", "eu"),
430
+ ("en", "fa"),
431
+ ("en", "fi"),
432
+ ("en", "fr"),
433
+ ("en", "fy"),
434
+ ("en", "ga"),
435
+ ("en", "gd"),
436
+ ("en", "gl"),
437
+ ("en", "ha"),
438
+ ("en", "he"),
439
+ ("en", "hi"),
440
+ ("en", "hr"),
441
+ ("en", "hu"),
442
+ ("en", "id"),
443
+ ("en", "ig"),
444
+ ("en", "il"),
445
+ ("en", "is"),
446
+ ("en", "it"),
447
+ ("en", "ja"),
448
+ ("en", "jv"),
449
+ ("en", "ko"),
450
+ ("en", "la"),
451
+ ("en", "lb"),
452
+ ("en", "lt"),
453
+ ("en", "lv"),
454
+ ("en", "mg"),
455
+ ("en", "mk"),
456
+ ("en", "ml"),
457
+ ("en", "mr"),
458
+ ("en", "ms"),
459
+ ("en", "ne"),
460
+ ("en", "nl"),
461
+ ("en", "no"),
462
+ ("en", "oc"),
463
+ ("en", "or"),
464
+ ("en", "pl"),
465
+ ("en", "pt"),
466
+ ("en", "ro"),
467
+ ("en", "ru"),
468
+ ("en", "sd"),
469
+ ("en", "si"),
470
+ ("en", "sk"),
471
+ ("en", "sl"),
472
+ ("en", "so"),
473
+ ("en", "sq"),
474
+ ("en", "sr"),
475
+ ("en", "su"),
476
+ ("en", "sv"),
477
+ ("en", "sw"),
478
+ ("en", "ta"),
479
+ ("en", "tl"),
480
+ ("en", "tr"),
481
+ ("en", "uk"),
482
+ ("en", "ur"),
483
+ ("en", "vi"),
484
+ ("en", "xh"),
485
+ ("en", "yi"),
486
+ ("en", "zh"),
487
+ ("eo", "es"),
488
+ ("eo", "et"),
489
+ ("eo", "eu"),
490
+ ("eo", "fa"),
491
+ ("eo", "fi"),
492
+ ("eo", "fr"),
493
+ ("eo", "he"),
494
+ ("eo", "hr"),
495
+ ("eo", "hu"),
496
+ ("eo", "it"),
497
+ ("eo", "lt"),
498
+ ("eo", "lv"),
499
+ ("eo", "mk"),
500
+ ("eo", "nl"),
501
+ ("eo", "no"),
502
+ ("eo", "ro"),
503
+ ("eo", "sk"),
504
+ ("eo", "sl"),
505
+ ("eo", "sq"),
506
+ ("eo", "sr"),
507
+ ("eo", "sv"),
508
+ ("eo", "sw"),
509
+ ("eo", "uk"),
510
+ ("es", "et"),
511
+ ("es", "eu"),
512
+ ("es", "fa"),
513
+ ("es", "fi"),
514
+ ("es", "fr"),
515
+ ("es", "gl"),
516
+ ("es", "he"),
517
+ ("es", "hi"),
518
+ ("es", "hu"),
519
+ ("es", "id"),
520
+ ("es", "it"),
521
+ ("es", "ja"),
522
+ ("es", "ko"),
523
+ ("es", "la"),
524
+ ("es", "lt"),
525
+ ("es", "lv"),
526
+ ("es", "mk"),
527
+ ("es", "nl"),
528
+ ("es", "no"),
529
+ ("es", "oc"),
530
+ ("es", "pl"),
531
+ ("es", "pt"),
532
+ ("es", "ro"),
533
+ ("es", "ru"),
534
+ ("es", "sk"),
535
+ ("es", "sl"),
536
+ ("es", "sq"),
537
+ ("es", "sr"),
538
+ ("es", "sv"),
539
+ ("es", "sw"),
540
+ ("es", "ta"),
541
+ ("es", "tr"),
542
+ ("es", "uk"),
543
+ ("es", "vi"),
544
+ ("es", "zh"),
545
+ ("et", "eu"),
546
+ ("et", "fa"),
547
+ ("et", "fi"),
548
+ ("et", "fr"),
549
+ ("et", "he"),
550
+ ("et", "hi"),
551
+ ("et", "hr"),
552
+ ("et", "hu"),
553
+ ("et", "id"),
554
+ ("et", "it"),
555
+ ("et", "ko"),
556
+ ("et", "lt"),
557
+ ("et", "lv"),
558
+ ("et", "mk"),
559
+ ("et", "nl"),
560
+ ("et", "no"),
561
+ ("et", "pl"),
562
+ ("et", "pt"),
563
+ ("et", "ro"),
564
+ ("et", "ru"),
565
+ ("et", "sk"),
566
+ ("et", "sl"),
567
+ ("et", "sq"),
568
+ ("et", "sr"),
569
+ ("et", "sv"),
570
+ ("et", "sw"),
571
+ ("et", "ta"),
572
+ ("et", "tr"),
573
+ ("et", "uk"),
574
+ ("et", "vi"),
575
+ ("et", "zh"),
576
+ ("eu", "fa"),
577
+ ("eu", "fi"),
578
+ ("eu", "he"),
579
+ ("eu", "hu"),
580
+ ("eu", "it"),
581
+ ("eu", "la"),
582
+ ("eu", "lt"),
583
+ ("eu", "lv"),
584
+ ("eu", "no"),
585
+ ("eu", "pt"),
586
+ ("eu", "sk"),
587
+ ("eu", "sl"),
588
+ ("eu", "sq"),
589
+ ("eu", "sr"),
590
+ ("eu", "tr"),
591
+ ("fa", "fi"),
592
+ ("fa", "fr"),
593
+ ("fa", "he"),
594
+ ("fa", "hi"),
595
+ ("fa", "hr"),
596
+ ("fa", "hu"),
597
+ ("fa", "id"),
598
+ ("fa", "it"),
599
+ ("fa", "ja"),
600
+ ("fa", "ko"),
601
+ ("fa", "la"),
602
+ ("fa", "lt"),
603
+ ("fa", "lv"),
604
+ ("fa", "ml"),
605
+ ("fa", "mr"),
606
+ ("fa", "ms"),
607
+ ("fa", "ne"),
608
+ ("fa", "nl"),
609
+ ("fa", "no"),
610
+ ("fa", "or"),
611
+ ("fa", "pl"),
612
+ ("fa", "pt"),
613
+ ("fa", "ro"),
614
+ ("fa", "ru"),
615
+ ("fa", "sd"),
616
+ ("fa", "si"),
617
+ ("fa", "sk"),
618
+ ("fa", "sl"),
619
+ ("fa", "sq"),
620
+ ("fa", "sr"),
621
+ ("fa", "sv"),
622
+ ("fa", "sw"),
623
+ ("fa", "ta"),
624
+ ("fa", "tl"),
625
+ ("fa", "tr"),
626
+ ("fa", "uk"),
627
+ ("fa", "ur"),
628
+ ("fa", "uz"),
629
+ ("fa", "vi"),
630
+ ("fa", "zh"),
631
+ ("fi", "fr"),
632
+ ("fi", "he"),
633
+ ("fi", "hi"),
634
+ ("fi", "hr"),
635
+ ("fi", "hu"),
636
+ ("fi", "id"),
637
+ ("fi", "it"),
638
+ ("fi", "ja"),
639
+ ("fi", "ko"),
640
+ ("fi", "lt"),
641
+ ("fi", "lv"),
642
+ ("fi", "mk"),
643
+ ("fi", "nl"),
644
+ ("fi", "no"),
645
+ ("fi", "pl"),
646
+ ("fi", "pt"),
647
+ ("fi", "ro"),
648
+ ("fi", "ru"),
649
+ ("fi", "sk"),
650
+ ("fi", "sl"),
651
+ ("fi", "sq"),
652
+ ("fi", "sr"),
653
+ ("fi", "sv"),
654
+ ("fi", "sw"),
655
+ ("fi", "ta"),
656
+ ("fi", "tr"),
657
+ ("fi", "uk"),
658
+ ("fi", "vi"),
659
+ ("fi", "zh"),
660
+ ("fr", "gl"),
661
+ ("fr", "he"),
662
+ ("fr", "hi"),
663
+ ("fr", "hr"),
664
+ ("fr", "hu"),
665
+ ("fr", "id"),
666
+ ("fr", "it"),
667
+ ("fr", "ja"),
668
+ ("fr", "ko"),
669
+ ("fr", "la"),
670
+ ("fr", "lt"),
671
+ ("fr", "lv"),
672
+ ("fr", "ml"),
673
+ ("fr", "ms"),
674
+ ("fr", "nl"),
675
+ ("fr", "no"),
676
+ ("fr", "oc"),
677
+ ("fr", "pl"),
678
+ ("fr", "pt"),
679
+ ("fr", "ro"),
680
+ ("fr", "ru"),
681
+ ("fr", "sk"),
682
+ ("fr", "sl"),
683
+ ("fr", "sr"),
684
+ ("fr", "sv"),
685
+ ("fr", "sw"),
686
+ ("fr", "ta"),
687
+ ("fr", "tl"),
688
+ ("fr", "tr"),
689
+ ("fr", "uk"),
690
+ ("fr", "vi"),
691
+ ("fr", "zh"),
692
+ ("fy", "is"),
693
+ ("fy", "lb"),
694
+ ("fy", "nl"),
695
+ ("fy", "no"),
696
+ ("fy", "yi"),
697
+ ("ga", "nl"),
698
+ ("gd", "nl"),
699
+ ("gd", "no"),
700
+ ("gl", "it"),
701
+ ("gl", "la"),
702
+ ("gl", "oc"),
703
+ ("gl", "pt"),
704
+ ("gl", "ro"),
705
+ ("gl", "tr"),
706
+ ("ha", "ig"),
707
+ ("ha", "nl"),
708
+ ("ha", "sw"),
709
+ ("ha", "yo"),
710
+ ("he", "hi"),
711
+ ("he", "hu"),
712
+ ("he", "id"),
713
+ ("he", "ja"),
714
+ ("he", "ko"),
715
+ ("he", "la"),
716
+ ("he", "lt"),
717
+ ("he", "lv"),
718
+ ("he", "mg"),
719
+ ("he", "ml"),
720
+ ("he", "mr"),
721
+ ("he", "ms"),
722
+ ("he", "ne"),
723
+ ("he", "nl"),
724
+ ("he", "no"),
725
+ ("he", "pl"),
726
+ ("he", "pt"),
727
+ ("he", "ro"),
728
+ ("he", "ru"),
729
+ ("he", "si"),
730
+ ("he", "sk"),
731
+ ("he", "sl"),
732
+ ("he", "sq"),
733
+ ("he", "sr"),
734
+ ("he", "sv"),
735
+ ("he", "sw"),
736
+ ("he", "ta"),
737
+ ("he", "tl"),
738
+ ("he", "tr"),
739
+ ("he", "uk"),
740
+ ("he", "ur"),
741
+ ("he", "vi"),
742
+ ("he", "zh"),
743
+ ("hi", "hu"),
744
+ ("hi", "id"),
745
+ ("hi", "il"),
746
+ ("hi", "it"),
747
+ ("hi", "ja"),
748
+ ("hi", "jv"),
749
+ ("hi", "ko"),
750
+ ("hi", "la"),
751
+ ("hi", "lt"),
752
+ ("hi", "lv"),
753
+ ("hi", "mg"),
754
+ ("hi", "ml"),
755
+ ("hi", "mr"),
756
+ ("hi", "ms"),
757
+ ("hi", "ne"),
758
+ ("hi", "nl"),
759
+ ("hi", "or"),
760
+ ("hi", "pl"),
761
+ ("hi", "pt"),
762
+ ("hi", "ro"),
763
+ ("hi", "ru"),
764
+ ("hi", "si"),
765
+ ("hi", "sk"),
766
+ ("hi", "sl"),
767
+ ("hi", "sr"),
768
+ ("hi", "sv"),
769
+ ("hi", "sw"),
770
+ ("hi", "ta"),
771
+ ("hi", "tl"),
772
+ ("hi", "tr"),
773
+ ("hi", "uk"),
774
+ ("hi", "ur"),
775
+ ("hi", "vi"),
776
+ ("hi", "zh"),
777
+ ("hr", "hu"),
778
+ ("hr", "lt"),
779
+ ("hr", "lv"),
780
+ ("hr", "mk"),
781
+ ("hr", "no"),
782
+ ("hr", "pl"),
783
+ ("hr", "ro"),
784
+ ("hr", "ru"),
785
+ ("hr", "sk"),
786
+ ("hr", "sl"),
787
+ ("hr", "sq"),
788
+ ("hr", "sr"),
789
+ ("hr", "ta"),
790
+ ("hr", "uk"),
791
+ ("hr", "zh"),
792
+ ("hu", "id"),
793
+ ("hu", "it"),
794
+ ("hu", "ja"),
795
+ ("hu", "ko"),
796
+ ("hu", "lt"),
797
+ ("hu", "lv"),
798
+ ("hu", "mk"),
799
+ ("hu", "nl"),
800
+ ("hu", "no"),
801
+ ("hu", "om"),
802
+ ("hu", "pl"),
803
+ ("hu", "pt"),
804
+ ("hu", "ro"),
805
+ ("hu", "ru"),
806
+ ("hu", "sk"),
807
+ ("hu", "sl"),
808
+ ("hu", "sq"),
809
+ ("hu", "sr"),
810
+ ("hu", "sv"),
811
+ ("hu", "sw"),
812
+ ("hu", "ta"),
813
+ ("hu", "tr"),
814
+ ("hu", "uk"),
815
+ ("hu", "vi"),
816
+ ("hu", "xh"),
817
+ ("hu", "zh"),
818
+ ("hu", "zu"),
819
+ ("hy", "ka"),
820
+ ("hy", "kk"),
821
+ ("hy", "km"),
822
+ ("hy", "my"),
823
+ ("hy", "tr"),
824
+ ("hy", "tt"),
825
+ ("hy", "vi"),
826
+ ("id", "il"),
827
+ ("id", "it"),
828
+ ("id", "ja"),
829
+ ("id", "jv"),
830
+ ("id", "ko"),
831
+ ("id", "lt"),
832
+ ("id", "lv"),
833
+ ("id", "mg"),
834
+ ("id", "ml"),
835
+ ("id", "mr"),
836
+ ("id", "ms"),
837
+ ("id", "ne"),
838
+ ("id", "nl"),
839
+ ("id", "no"),
840
+ ("id", "pl"),
841
+ ("id", "pt"),
842
+ ("id", "ro"),
843
+ ("id", "ru"),
844
+ ("id", "si"),
845
+ ("id", "sk"),
846
+ ("id", "sl"),
847
+ ("id", "sr"),
848
+ ("id", "su"),
849
+ ("id", "sv"),
850
+ ("id", "sw"),
851
+ ("id", "ta"),
852
+ ("id", "tl"),
853
+ ("id", "tr"),
854
+ ("id", "uk"),
855
+ ("id", "ur"),
856
+ ("id", "vi"),
857
+ ("id", "zh"),
858
+ ("ig", "nl"),
859
+ ("ig", "sw"),
860
+ ("ig", "yo"),
861
+ ("ilo", "jv"),
862
+ ("ilo", "mg"),
863
+ ("ilo", "ml"),
864
+ ("ilo", "ms"),
865
+ ("ilo", "su"),
866
+ ("ilo", "tl"),
867
+ ("is", "lb"),
868
+ ("is", "nl"),
869
+ ("is", "no"),
870
+ ("is", "sv"),
871
+ ("is", "yi"),
872
+ ("it", "ja"),
873
+ ("it", "ko"),
874
+ ("it", "la"),
875
+ ("it", "lt"),
876
+ ("it", "lv"),
877
+ ("it", "nl"),
878
+ ("it", "no"),
879
+ ("it", "oc"),
880
+ ("it", "pl"),
881
+ ("it", "pt"),
882
+ ("it", "ro"),
883
+ ("it", "ru"),
884
+ ("it", "sk"),
885
+ ("it", "sl"),
886
+ ("it", "sq"),
887
+ ("it", "sr"),
888
+ ("it", "sv"),
889
+ ("it", "sw"),
890
+ ("it", "ta"),
891
+ ("it", "tr"),
892
+ ("it", "uk"),
893
+ ("it", "vi"),
894
+ ("it", "zh"),
895
+ ("ja", "ko"),
896
+ ("ja", "lt"),
897
+ ("ja", "ml"),
898
+ ("ja", "ms"),
899
+ ("ja", "nl"),
900
+ ("ja", "no"),
901
+ ("ja", "pl"),
902
+ ("ja", "pt"),
903
+ ("ja", "ro"),
904
+ ("ja", "ru"),
905
+ ("ja", "sk"),
906
+ ("ja", "sl"),
907
+ ("ja", "sr"),
908
+ ("ja", "sv"),
909
+ ("ja", "sw"),
910
+ ("ja", "ta"),
911
+ ("ja", "tl"),
912
+ ("ja", "tr"),
913
+ ("ja", "uk"),
914
+ ("ja", "vi"),
915
+ ("ja", "zh"),
916
+ ("jv", "mg"),
917
+ ("jv", "ml"),
918
+ ("jv", "ms"),
919
+ ("jv", "su"),
920
+ ("jv", "tl"),
921
+ ("ka", "kk"),
922
+ ("ka", "tr"),
923
+ ("ka", "tt"),
924
+ ("ka", "vi"),
925
+ ("kk", "tr"),
926
+ ("kk", "tt"),
927
+ ("kk", "vi"),
928
+ ("km", "tr"),
929
+ ("ko", "lt"),
930
+ ("ko", "lv"),
931
+ ("ko", "mk"),
932
+ ("ko", "nl"),
933
+ ("ko", "no"),
934
+ ("ko", "pl"),
935
+ ("ko", "pt"),
936
+ ("ko", "ru"),
937
+ ("ko", "sk"),
938
+ ("ko", "sl"),
939
+ ("ko", "sr"),
940
+ ("ko", "sv"),
941
+ ("ko", "sw"),
942
+ ("ko", "ta"),
943
+ ("ko", "tr"),
944
+ ("ko", "uk"),
945
+ ("ko", "vi"),
946
+ ("ko", "zh"),
947
+ ("la", "oc"),
948
+ ("la", "pt"),
949
+ ("la", "ro"),
950
+ ("la", "sw"),
951
+ ("la", "ta"),
952
+ ("la", "tr"),
953
+ ("lb", "nl"),
954
+ ("lb", "no"),
955
+ ("lb", "zh"),
956
+ ("lg", "sw"),
957
+ ("lt", "lv"),
958
+ ("lt", "mg"),
959
+ ("lt", "mk"),
960
+ ("lt", "nl"),
961
+ ("lt", "no"),
962
+ ("lt", "pl"),
963
+ ("lt", "pt"),
964
+ ("lt", "ro"),
965
+ ("lt", "ru"),
966
+ ("lt", "sk"),
967
+ ("lt", "sl"),
968
+ ("lt", "sq"),
969
+ ("lt", "sr"),
970
+ ("lt", "sv"),
971
+ ("lt", "sw"),
972
+ ("lt", "ta"),
973
+ ("lt", "tr"),
974
+ ("lt", "uk"),
975
+ ("lt", "vi"),
976
+ ("lt", "zh"),
977
+ ("lv", "mk"),
978
+ ("lv", "nl"),
979
+ ("lv", "no"),
980
+ ("lv", "pl"),
981
+ ("lv", "pt"),
982
+ ("lv", "ro"),
983
+ ("lv", "ru"),
984
+ ("lv", "sk"),
985
+ ("lv", "sl"),
986
+ ("lv", "sq"),
987
+ ("lv", "sr"),
988
+ ("lv", "sv"),
989
+ ("lv", "sw"),
990
+ ("lv", "ta"),
991
+ ("lv", "tr"),
992
+ ("lv", "uk"),
993
+ ("lv", "vi"),
994
+ ("lv", "zh"),
995
+ ("mg", "ml"),
996
+ ("mg", "ms"),
997
+ ("mg", "ru"),
998
+ ("mg", "su"),
999
+ ("mg", "ta"),
1000
+ ("mg", "tl"),
1001
+ ("mg", "zh"),
1002
+ ("mk", "nl"),
1003
+ ("mk", "no"),
1004
+ ("mk", "pl"),
1005
+ ("mk", "ro"),
1006
+ ("mk", "ru"),
1007
+ ("mk", "sk"),
1008
+ ("mk", "sl"),
1009
+ ("mk", "sq"),
1010
+ ("mk", "sv"),
1011
+ ("mk", "uk"),
1012
+ ("mk", "vi"),
1013
+ ("mk", "zh"),
1014
+ ("ml", "ms"),
1015
+ ("ml", "ru"),
1016
+ ("ml", "su"),
1017
+ ("ml", "ta"),
1018
+ ("ml", "tl"),
1019
+ ("ml", "tr"),
1020
+ ("ml", "zh"),
1021
+ ("mr", "ne"),
1022
+ ("mr", "or"),
1023
+ ("mr", "ru"),
1024
+ ("mr", "si"),
1025
+ ("mr", "ta"),
1026
+ ("mr", "tr"),
1027
+ ("mr", "ur"),
1028
+ ("ms", "ru"),
1029
+ ("ms", "su"),
1030
+ ("ms", "ta"),
1031
+ ("ms", "tl"),
1032
+ ("ms", "tr"),
1033
+ ("ms", "vi"),
1034
+ ("ms", "zh"),
1035
+ ("my", "tr"),
1036
+ ("ne", "or"),
1037
+ ("ne", "ru"),
1038
+ ("ne", "si"),
1039
+ ("ne", "ta"),
1040
+ ("ne", "tr"),
1041
+ ("ne", "ur"),
1042
+ ("nl", "no"),
1043
+ ("nl", "pl"),
1044
+ ("nl", "pt"),
1045
+ ("nl", "ro"),
1046
+ ("nl", "ru"),
1047
+ ("nl", "sk"),
1048
+ ("nl", "sl"),
1049
+ ("nl", "so"),
1050
+ ("nl", "sr"),
1051
+ ("nl", "sv"),
1052
+ ("nl", "sw"),
1053
+ ("nl", "ta"),
1054
+ ("nl", "tr"),
1055
+ ("nl", "uk"),
1056
+ ("nl", "vi"),
1057
+ ("nl", "yi"),
1058
+ ("nl", "yo"),
1059
+ ("nl", "zh"),
1060
+ ("no", "pl"),
1061
+ ("no", "pt"),
1062
+ ("no", "ro"),
1063
+ ("no", "ru"),
1064
+ ("no", "sk"),
1065
+ ("no", "sl"),
1066
+ ("no", "sq"),
1067
+ ("no", "sr"),
1068
+ ("no", "sv"),
1069
+ ("no", "ta"),
1070
+ ("no", "tr"),
1071
+ ("no", "uk"),
1072
+ ("no", "vi"),
1073
+ ("no", "yi"),
1074
+ ("no", "zh"),
1075
+ ("oc", "pt"),
1076
+ ("oc", "ro"),
1077
+ ("om", "sw"),
1078
+ ("or", "si"),
1079
+ ("or", "ta"),
1080
+ ("or", "ur"),
1081
+ ("pl", "pt"),
1082
+ ("pl", "ro"),
1083
+ ("pl", "ru"),
1084
+ ("pl", "sk"),
1085
+ ("pl", "sl"),
1086
+ ("pl", "sq"),
1087
+ ("pl", "sr"),
1088
+ ("pl", "sv"),
1089
+ ("pl", "sw"),
1090
+ ("pl", "ta"),
1091
+ ("pl", "tr"),
1092
+ ("pl", "uk"),
1093
+ ("pl", "vi"),
1094
+ ("pl", "zh"),
1095
+ ("pt", "ro"),
1096
+ ("pt", "ru"),
1097
+ ("pt", "sk"),
1098
+ ("pt", "sl"),
1099
+ ("pt", "sr"),
1100
+ ("pt", "sv"),
1101
+ ("pt", "sw"),
1102
+ ("pt", "ta"),
1103
+ ("pt", "tr"),
1104
+ ("pt", "uk"),
1105
+ ("pt", "vi"),
1106
+ ("pt", "zh"),
1107
+ ("ro", "sk"),
1108
+ ("ro", "sl"),
1109
+ ("ro", "sq"),
1110
+ ("ro", "sr"),
1111
+ ("ro", "sv"),
1112
+ ("ro", "ta"),
1113
+ ("ro", "tr"),
1114
+ ("ro", "uk"),
1115
+ ("ro", "vi"),
1116
+ ("ro", "zh"),
1117
+ ("ru", "si"),
1118
+ ("ru", "sk"),
1119
+ ("ru", "sl"),
1120
+ ("ru", "sq"),
1121
+ ("ru", "sr"),
1122
+ ("ru", "sv"),
1123
+ ("ru", "sw"),
1124
+ ("ru", "ta"),
1125
+ ("ru", "tl"),
1126
+ ("ru", "tr"),
1127
+ ("ru", "uk"),
1128
+ ("ru", "ur"),
1129
+ ("ru", "vi"),
1130
+ ("ru", "zh"),
1131
+ ("si", "ta"),
1132
+ ("si", "tr"),
1133
+ ("si", "ur"),
1134
+ ("sk", "sl"),
1135
+ ("sk", "sq"),
1136
+ ("sk", "sr"),
1137
+ ("sk", "sv"),
1138
+ ("sk", "sw"),
1139
+ ("sk", "ta"),
1140
+ ("sk", "tr"),
1141
+ ("sk", "uk"),
1142
+ ("sk", "vi"),
1143
+ ("sk", "zh"),
1144
+ ("sl", "sq"),
1145
+ ("sl", "sr"),
1146
+ ("sl", "sv"),
1147
+ ("sl", "sw"),
1148
+ ("sl", "ta"),
1149
+ ("sl", "tr"),
1150
+ ("sl", "uk"),
1151
+ ("sl", "vi"),
1152
+ ("sl", "zh"),
1153
+ ("so", "sw"),
1154
+ ("sq", "sr"),
1155
+ ("sq", "sv"),
1156
+ ("sq", "tr"),
1157
+ ("sq", "uk"),
1158
+ ("sr", "sv"),
1159
+ ("sr", "sw"),
1160
+ ("sr", "ta"),
1161
+ ("sr", "tr"),
1162
+ ("sr", "uk"),
1163
+ ("sr", "vi"),
1164
+ ("sr", "zh"),
1165
+ ("su", "tl"),
1166
+ ("sv", "sw"),
1167
+ ("sv", "ta"),
1168
+ ("sv", "tr"),
1169
+ ("sv", "uk"),
1170
+ ("sv", "vi"),
1171
+ ("sv", "zh"),
1172
+ ("sw", "ta"),
1173
+ ("sw", "tr"),
1174
+ ("sw", "uk"),
1175
+ ("sw", "vi"),
1176
+ ("sw", "wo"),
1177
+ ("sw", "xh"),
1178
+ ("sw", "yo"),
1179
+ ("sw", "zh"),
1180
+ ("sw", "zu"),
1181
+ ("ta", "tl"),
1182
+ ("ta", "tr"),
1183
+ ("ta", "uk"),
1184
+ ("ta", "ur"),
1185
+ ("ta", "vi"),
1186
+ ("ta", "zh"),
1187
+ ("tl", "tr"),
1188
+ ("tl", "vi"),
1189
+ ("tl", "zh"),
1190
+ ("tr", "uk"),
1191
+ ("tr", "ur"),
1192
+ ("tr", "uz"),
1193
+ ("tr", "vi"),
1194
+ ("tr", "zh"),
1195
+ ("uk", "vi"),
1196
+ ("uk", "zh"),
1197
+ ("vi", "zh"),
1198
+ ("yi", "zh"),
1199
+ ]
nllb.py CHANGED
@@ -12,16 +12,21 @@
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
- """No Language Left Behind (NLLB)"""
 
 
 
 
 
 
16
 
17
  import datasets
18
- import csv
19
- import json
20
 
21
  _CITATION = (
22
  "@article{team2022NoLL,"
23
  "title={No Language Left Behind: Scaling Human-Centered Machine Translation},"
24
- "author={Nllb team and Marta Ruiz Costa-juss{\`a} and James Cross and Onur cCelebi and Maha Elbayad and Kenneth Heafield and Kevin Heffernan and Elahe Kalbassi and Janice Lam and Daniel Licht and Jean Maillard and Anna Sun and Skyler Wang and Guillaume Wenzek and Alison Youngblood and Bapi Akula and Lo{\"i}c Barrault and Gabriel Mejia Gonzalez and Prangthip Hansanti and John Hoffman and Semarley Jarrett and Kaushik Ram Sadagopan and Dirk Rowe and Shannon L. Spruit and C. Tran and Pierre Andrews and Necip Fazil Ayan and Shruti Bhosale and Sergey Edunov and Angela Fan and Cynthia Gao and Vedanuj Goswami and Francisco Guzm'an and Philipp Koehn and Alexandre Mourachko and Christophe Ropers and Safiyyah Saleem and Holger Schwenk and Jeff Wang},"
25
  "journal={ArXiv},"
26
  "year={2022},"
27
  "volume={abs/2207.04672}"
@@ -36,6 +41,7 @@ _HOMEPAGE = "" # TODO
36
  _LICENSE = "https://opendatacommons.org/licenses/by/1-0/"
37
 
38
  from .nllb_lang_pairs import LANG_PAIRS as _LANGUAGE_PAIRS
 
39
 
40
  _URL_BASE = "https://storage.googleapis.com/allennlp-data-bucket/nllb/"
41
 
@@ -44,29 +50,58 @@ _URLs = {
44
  for src_lg, trg_lg in _LANGUAGE_PAIRS
45
  }
46
 
 
 
 
 
 
 
 
 
47
 
48
  class NLLBTaskConfig(datasets.BuilderConfig):
49
  """BuilderConfig for No Language Left Behind Dataset."""
50
 
51
- def __init__(self, src_lg, tgt_lg, **kwargs):
52
  super(NLLBTaskConfig, self).__init__(**kwargs)
53
  self.src_lg = src_lg
54
  self.tgt_lg = tgt_lg
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
 
57
  class NLLB(datasets.GeneratorBasedBuilder):
58
  """No Language Left Behind Dataset."""
59
 
60
- BUILDER_CONFIGS = [
61
- NLLBTaskConfig(
62
- name=f"{src_lg}-{tgt_lg}",
63
- version=datasets.Version("1.0.0"),
64
- description=f"No Language Left Behind (NLLB): {src_lg} - {tgt_lg}",
65
- src_lg=src_lg,
66
- tgt_lg=tgt_lg,
67
- )
68
- for (src_lg, tgt_lg) in _LANGUAGE_PAIRS
69
- ]
70
  BUILDER_CONFIG_CLASS = NLLBTaskConfig
71
 
72
  def _info(self):
@@ -85,6 +120,16 @@ class NLLB(datasets.GeneratorBasedBuilder):
85
  "target_sentence_url": datasets.Value("string"),
86
  }
87
  )
 
 
 
 
 
 
 
 
 
 
88
 
89
  return datasets.DatasetInfo(
90
  description=_DESCRIPTION,
@@ -115,6 +160,13 @@ class NLLB(datasets.GeneratorBasedBuilder):
115
  ]
116
 
117
  def _generate_examples(self, filepath, source_lg, target_lg):
 
 
 
 
 
 
 
118
  with open(filepath, encoding="utf-8") as f:
119
  # reader = csv.reader(f, delimiter="\t")
120
  for id_, example in enumerate(f):
@@ -140,6 +192,23 @@ class NLLB(datasets.GeneratorBasedBuilder):
140
  raise
141
  yield id_, row
142
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
 
144
  # to test the script, go to the root folder of the repo (nllb) and run:
145
  # datasets-cli test nllb --save_infos --all_configs
 
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
+ """No Language Left Behind (NLLB)
16
+
17
+ The "No Language Left Behind" paper is a dataset with translation examples across 200 languages.
18
+ This paper reuses prior work, and for some language pairs is just reusing CC-Matrix published on statmt.org.
19
+ Depending on the language pair chosen, this script will fetch either the original
20
+ version from statmt.org, or the new one from AllenAI.
21
+ """
22
 
23
  import datasets
24
+ import typing as tp
 
25
 
26
  _CITATION = (
27
  "@article{team2022NoLL,"
28
  "title={No Language Left Behind: Scaling Human-Centered Machine Translation},"
29
+ "author={Nllb team and Marta Ruiz Costa-juss{\`a} and James Cross and Onur Celebi and Maha Elbayad and Kenneth Heafield and Kevin Heffernan and Elahe Kalbassi and Janice Lam and Daniel Licht and Jean Maillard and Anna Sun and Skyler Wang and Guillaume Wenzek and Alison Youngblood and Bapi Akula and Lo{\"i}c Barrault and Gabriel Mejia Gonzalez and Prangthip Hansanti and John Hoffman and Semarley Jarrett and Kaushik Ram Sadagopan and Dirk Rowe and Shannon L. Spruit and C. Tran and Pierre Andrews and Necip Fazil Ayan and Shruti Bhosale and Sergey Edunov and Angela Fan and Cynthia Gao and Vedanuj Goswami and Francisco Guzm'an and Philipp Koehn and Alexandre Mourachko and Christophe Ropers and Safiyyah Saleem and Holger Schwenk and Jeff Wang},"
30
  "journal={ArXiv},"
31
  "year={2022},"
32
  "volume={abs/2207.04672}"
 
41
  _LICENSE = "https://opendatacommons.org/licenses/by/1-0/"
42
 
43
  from .nllb_lang_pairs import LANG_PAIRS as _LANGUAGE_PAIRS
44
+ from .ccmatrix_lang_pairs import LANG_PAIRS as _CCMATRIX_LANGUAGE_PAIRS
45
 
46
  _URL_BASE = "https://storage.googleapis.com/allennlp-data-bucket/nllb/"
47
 
 
50
  for src_lg, trg_lg in _LANGUAGE_PAIRS
51
  }
52
 
53
+ _STATMT_URL = "http://data.statmt.org/cc-matrix/"
54
+ _URLs.update(
55
+ {
56
+ f"{src_lg}-{trg_lg}": f"{_STATMT_URL}{src_lg}-{trg_lg}.bitextf.tsv.gz"
57
+ for src_lg, trg_lg in _CCMATRIX_LANGUAGE_PAIRS
58
+ }
59
+ )
60
+
61
 
62
  class NLLBTaskConfig(datasets.BuilderConfig):
63
  """BuilderConfig for No Language Left Behind Dataset."""
64
 
65
+ def __init__(self, src_lg, tgt_lg, source, **kwargs):
66
  super(NLLBTaskConfig, self).__init__(**kwargs)
67
  self.src_lg = src_lg
68
  self.tgt_lg = tgt_lg
69
+ url = _URLs.get(f"{src_lg}-{tgt_lg}", "")
70
+ self.source = source
71
+
72
+
73
+ def _builder_configs() -> tp.List[NLLBTaskConfig]:
74
+ configs = []
75
+ for (src_lg, tgt_lg) in _LANGUAGE_PAIRS:
76
+ configs.append(
77
+ NLLBTaskConfig(
78
+ name=f"{src_lg}-{tgt_lg}",
79
+ version=datasets.Version("1.0.0"),
80
+ description=f"No Language Left Behind (NLLB): {src_lg} - {tgt_lg}",
81
+ src_lg=src_lg,
82
+ tgt_lg=tgt_lg,
83
+ source="allenai",
84
+ )
85
+ )
86
+
87
+ for (src_lg, tgt_lg) in _CCMATRIX_LANGUAGE_PAIRS:
88
+ configs.append(
89
+ NLLBTaskConfig(
90
+ name=f"{src_lg}-{tgt_lg}",
91
+ version=datasets.Version("1.0.0"),
92
+ description=f"No Language Left Behind (NLLB): {src_lg} - {tgt_lg}",
93
+ src_lg=src_lg,
94
+ tgt_lg=tgt_lg,
95
+ source="mtstats",
96
+ )
97
+ )
98
+ return configs
99
 
100
 
101
  class NLLB(datasets.GeneratorBasedBuilder):
102
  """No Language Left Behind Dataset."""
103
 
104
+ BUILDER_CONFIGS = _builder_configs()
 
 
 
 
 
 
 
 
 
105
  BUILDER_CONFIG_CLASS = NLLBTaskConfig
106
 
107
  def _info(self):
 
120
  "target_sentence_url": datasets.Value("string"),
121
  }
122
  )
123
+ if self.config.source == "mtstats":
124
+ # MT stats didn't published all the metadata
125
+ features = datasets.Features(
126
+ {
127
+ "translation": datasets.Translation(
128
+ languages=(self.config.src_lg, self.config.tgt_lg)
129
+ ),
130
+ "laser_score": datasets.Value("float32"),
131
+ }
132
+ )
133
 
134
  return datasets.DatasetInfo(
135
  description=_DESCRIPTION,
 
160
  ]
161
 
162
  def _generate_examples(self, filepath, source_lg, target_lg):
163
+ if self.config.source == "mtstats":
164
+ # MT stats didn't published all the metadata
165
+ return self._generate_minimal_examples(filepath, source_lg, target_lg)
166
+
167
+ return self._generate_full_examples(filepath, source_lg, target_lg)
168
+
169
+ def _generate_full_examples(self, filepath, source_lg, target_lg):
170
  with open(filepath, encoding="utf-8") as f:
171
  # reader = csv.reader(f, delimiter="\t")
172
  for id_, example in enumerate(f):
 
192
  raise
193
  yield id_, row
194
 
195
+ def _generate_minimal_examples(self, filepath, source_lg, target_lg):
196
+ with open(filepath, encoding="utf-8") as f:
197
+ for i, example in enumerate(f):
198
+ try:
199
+ (score, src, tgt) = example.rstrip("\n").split("\t")
200
+ row = {
201
+ "translation": {
202
+ source_lg: src,
203
+ target_lg: tgt,
204
+ },
205
+ "laser_score": score,
206
+ }
207
+ except:
208
+ print(example)
209
+ raise
210
+ yield i, row
211
+
212
 
213
  # to test the script, go to the root folder of the repo (nllb) and run:
214
  # datasets-cli test nllb --save_infos --all_configs