Commit
•
7fabecf
0
Parent(s):
Update files from the datasets library (from 1.2.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.2.0
- .gitattributes +27 -0
- README.md +504 -0
- dataset_infos.json +1 -0
- dummy/en-mr/2020.11.9/dummy_data.zip +3 -0
- dummy/eo-nl/2020.11.9/dummy_data.zip +3 -0
- dummy/es-gl/2020.11.9/dummy_data.zip +3 -0
- dummy/es-pt/2020.11.9/dummy_data.zip +3 -0
- dummy/fr-ru/2020.11.9/dummy_data.zip +3 -0
- tatoeba.py +128 -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,504 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- found
|
4 |
+
language_creators:
|
5 |
+
- found
|
6 |
+
languages:
|
7 |
+
- ab
|
8 |
+
- acm
|
9 |
+
- ady
|
10 |
+
- af
|
11 |
+
- afb
|
12 |
+
- afh
|
13 |
+
- aii
|
14 |
+
- ain
|
15 |
+
- ajp
|
16 |
+
- akl
|
17 |
+
- aln
|
18 |
+
- am
|
19 |
+
- an
|
20 |
+
- ang
|
21 |
+
- aoz
|
22 |
+
- apc
|
23 |
+
- ar
|
24 |
+
- arq
|
25 |
+
- ary
|
26 |
+
- arz
|
27 |
+
- as
|
28 |
+
- ast
|
29 |
+
- avk
|
30 |
+
- awa
|
31 |
+
- ayl
|
32 |
+
- az
|
33 |
+
- ba
|
34 |
+
- bal
|
35 |
+
- bar
|
36 |
+
- be
|
37 |
+
- ber
|
38 |
+
- bg
|
39 |
+
- bho
|
40 |
+
- bjn
|
41 |
+
- bm
|
42 |
+
- bn
|
43 |
+
- bo
|
44 |
+
- br
|
45 |
+
- brx
|
46 |
+
- bs
|
47 |
+
- bua
|
48 |
+
- bvy
|
49 |
+
- bzt
|
50 |
+
- ca
|
51 |
+
- cay
|
52 |
+
- cbk
|
53 |
+
- ce
|
54 |
+
- ceb
|
55 |
+
- ch
|
56 |
+
- chg
|
57 |
+
- chn
|
58 |
+
- cho
|
59 |
+
- chr
|
60 |
+
- cjy
|
61 |
+
- ckb
|
62 |
+
- ckt
|
63 |
+
- cmn
|
64 |
+
- co
|
65 |
+
- cpi
|
66 |
+
- crh
|
67 |
+
- crk
|
68 |
+
- cs
|
69 |
+
- csb
|
70 |
+
- cv
|
71 |
+
- cy
|
72 |
+
- cycl
|
73 |
+
- da
|
74 |
+
- de
|
75 |
+
- dng
|
76 |
+
- drt
|
77 |
+
- dsb
|
78 |
+
- dtp
|
79 |
+
- dv
|
80 |
+
- dws
|
81 |
+
- ee
|
82 |
+
- egl
|
83 |
+
- el
|
84 |
+
- emx
|
85 |
+
- en
|
86 |
+
- enm
|
87 |
+
- eo
|
88 |
+
- es
|
89 |
+
- et
|
90 |
+
- eu
|
91 |
+
- ext
|
92 |
+
- fi
|
93 |
+
- fj
|
94 |
+
- fkv
|
95 |
+
- fo
|
96 |
+
- fr
|
97 |
+
- frm
|
98 |
+
- fro
|
99 |
+
- frr
|
100 |
+
- fuc
|
101 |
+
- fur
|
102 |
+
- fuv
|
103 |
+
- fy
|
104 |
+
- ga
|
105 |
+
- gag
|
106 |
+
- gan
|
107 |
+
- gbm
|
108 |
+
- gcf
|
109 |
+
- gd
|
110 |
+
- gil
|
111 |
+
- gl
|
112 |
+
- gn
|
113 |
+
- gom
|
114 |
+
- gos
|
115 |
+
- got
|
116 |
+
- grc
|
117 |
+
- gsw
|
118 |
+
- gu
|
119 |
+
- gv
|
120 |
+
- ha
|
121 |
+
- hak
|
122 |
+
- haw
|
123 |
+
- hbo
|
124 |
+
- he
|
125 |
+
- hi
|
126 |
+
- hif
|
127 |
+
- hil
|
128 |
+
- hnj
|
129 |
+
- hoc
|
130 |
+
- hr
|
131 |
+
- hrx
|
132 |
+
- hsb
|
133 |
+
- hsn
|
134 |
+
- ht
|
135 |
+
- hu
|
136 |
+
- hy
|
137 |
+
- ia
|
138 |
+
- iba
|
139 |
+
- id
|
140 |
+
- ie
|
141 |
+
- ig
|
142 |
+
- ii
|
143 |
+
- ike
|
144 |
+
- ilo
|
145 |
+
- io
|
146 |
+
- is
|
147 |
+
- it
|
148 |
+
- izh
|
149 |
+
- ja
|
150 |
+
- jam
|
151 |
+
- jbo
|
152 |
+
- jdt
|
153 |
+
- jpa
|
154 |
+
- jv
|
155 |
+
- ka
|
156 |
+
- kaa
|
157 |
+
- kab
|
158 |
+
- kam
|
159 |
+
- kek
|
160 |
+
- kha
|
161 |
+
- kjh
|
162 |
+
- kk
|
163 |
+
- kl
|
164 |
+
- km
|
165 |
+
- kmr
|
166 |
+
- kn
|
167 |
+
- ko
|
168 |
+
- koi
|
169 |
+
- kpv
|
170 |
+
- krc
|
171 |
+
- krl
|
172 |
+
- ksh
|
173 |
+
- ku
|
174 |
+
- kum
|
175 |
+
- kw
|
176 |
+
- kxi
|
177 |
+
- ky
|
178 |
+
- kzj
|
179 |
+
- la
|
180 |
+
- laa
|
181 |
+
- lad
|
182 |
+
- lb
|
183 |
+
- ldn
|
184 |
+
- lfn
|
185 |
+
- lg
|
186 |
+
- lij
|
187 |
+
- liv
|
188 |
+
- lkt
|
189 |
+
- lld
|
190 |
+
- lmo
|
191 |
+
- ln
|
192 |
+
- lo
|
193 |
+
- lt
|
194 |
+
- ltg
|
195 |
+
- lut
|
196 |
+
- lv
|
197 |
+
- lzh
|
198 |
+
- lzz
|
199 |
+
- mad
|
200 |
+
- mai
|
201 |
+
- max
|
202 |
+
- mdf
|
203 |
+
- mfe
|
204 |
+
- mg
|
205 |
+
- mgm
|
206 |
+
- mh
|
207 |
+
- mhr
|
208 |
+
- mi
|
209 |
+
- mic
|
210 |
+
- min
|
211 |
+
- mk
|
212 |
+
- ml
|
213 |
+
- mn
|
214 |
+
- mni
|
215 |
+
- mnw
|
216 |
+
- moh
|
217 |
+
- mr
|
218 |
+
- mt
|
219 |
+
- mvv
|
220 |
+
- mwl
|
221 |
+
- mww
|
222 |
+
- my
|
223 |
+
- myv
|
224 |
+
- na
|
225 |
+
- nah
|
226 |
+
- nan
|
227 |
+
- nb
|
228 |
+
- nch
|
229 |
+
- nds
|
230 |
+
- ngt
|
231 |
+
- ngu
|
232 |
+
- niu
|
233 |
+
- nl
|
234 |
+
- nlv
|
235 |
+
- nn
|
236 |
+
- nog
|
237 |
+
- non
|
238 |
+
- nov
|
239 |
+
- npi
|
240 |
+
- nst
|
241 |
+
- nus
|
242 |
+
- nv
|
243 |
+
- ny
|
244 |
+
- nys
|
245 |
+
- oar
|
246 |
+
- oc
|
247 |
+
- ofs
|
248 |
+
- ood
|
249 |
+
- or
|
250 |
+
- orv
|
251 |
+
- os
|
252 |
+
- osp
|
253 |
+
- ota
|
254 |
+
- otk
|
255 |
+
- pa
|
256 |
+
- pag
|
257 |
+
- pal
|
258 |
+
- pam
|
259 |
+
- pap
|
260 |
+
- pau
|
261 |
+
- pcd
|
262 |
+
- pdc
|
263 |
+
- pes
|
264 |
+
- phn
|
265 |
+
- pi
|
266 |
+
- pl
|
267 |
+
- pms
|
268 |
+
- pnb
|
269 |
+
- ppl
|
270 |
+
- prg
|
271 |
+
- ps
|
272 |
+
- pt
|
273 |
+
- qu
|
274 |
+
- quc
|
275 |
+
- qya
|
276 |
+
- rap
|
277 |
+
- rif
|
278 |
+
- rm
|
279 |
+
- rn
|
280 |
+
- ro
|
281 |
+
- rom
|
282 |
+
- ru
|
283 |
+
- rue
|
284 |
+
- rw
|
285 |
+
- sa
|
286 |
+
- sah
|
287 |
+
- sc
|
288 |
+
- scn
|
289 |
+
- sco
|
290 |
+
- sd
|
291 |
+
- sdh
|
292 |
+
- se
|
293 |
+
- sg
|
294 |
+
- sgs
|
295 |
+
- shs
|
296 |
+
- shy
|
297 |
+
- si
|
298 |
+
- sjn
|
299 |
+
- sl
|
300 |
+
- sm
|
301 |
+
- sma
|
302 |
+
- sn
|
303 |
+
- so
|
304 |
+
- sq
|
305 |
+
- sr
|
306 |
+
- stq
|
307 |
+
- su
|
308 |
+
- sux
|
309 |
+
- sv
|
310 |
+
- swg
|
311 |
+
- swh
|
312 |
+
- syc
|
313 |
+
- ta
|
314 |
+
- te
|
315 |
+
- tet
|
316 |
+
- tg
|
317 |
+
- th
|
318 |
+
- thv
|
319 |
+
- ti
|
320 |
+
- tig
|
321 |
+
- tk
|
322 |
+
- tl
|
323 |
+
- tlh
|
324 |
+
- tly
|
325 |
+
- tmr
|
326 |
+
- tmw
|
327 |
+
- tn
|
328 |
+
- to
|
329 |
+
- toi
|
330 |
+
- toki
|
331 |
+
- tpi
|
332 |
+
- tpw
|
333 |
+
- tr
|
334 |
+
- ts
|
335 |
+
- tt
|
336 |
+
- tts
|
337 |
+
- tvl
|
338 |
+
- ty
|
339 |
+
- tyv
|
340 |
+
- tzl
|
341 |
+
- udm
|
342 |
+
- ug
|
343 |
+
- uk
|
344 |
+
- umb
|
345 |
+
- ur
|
346 |
+
- uz
|
347 |
+
- vec
|
348 |
+
- vep
|
349 |
+
- vi
|
350 |
+
- vo
|
351 |
+
- vro
|
352 |
+
- wa
|
353 |
+
- war
|
354 |
+
- wo
|
355 |
+
- wuu
|
356 |
+
- xal
|
357 |
+
- xh
|
358 |
+
- xqa
|
359 |
+
- yi
|
360 |
+
- yo
|
361 |
+
- yue
|
362 |
+
- zlm
|
363 |
+
- zsm
|
364 |
+
- zu
|
365 |
+
- zza
|
366 |
+
licenses:
|
367 |
+
- cc-by-2-0
|
368 |
+
multilinguality:
|
369 |
+
- multilingual
|
370 |
+
size_categories:
|
371 |
+
- 10K<n<100K
|
372 |
+
source_datasets:
|
373 |
+
- original
|
374 |
+
task_categories:
|
375 |
+
- conditional-text-generation
|
376 |
+
task_ids:
|
377 |
+
- machine-translation
|
378 |
+
---
|
379 |
+
# Dataset Card Creation Guide
|
380 |
+
|
381 |
+
## Table of Contents
|
382 |
+
- [Dataset Description](#dataset-description)
|
383 |
+
- [Dataset Summary](#dataset-summary)
|
384 |
+
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
385 |
+
- [Languages](#languages)
|
386 |
+
- [Dataset Structure](#dataset-structure)
|
387 |
+
- [Data Instances](#data-instances)
|
388 |
+
- [Data Fields](#data-instances)
|
389 |
+
- [Data Splits](#data-instances)
|
390 |
+
- [Dataset Creation](#dataset-creation)
|
391 |
+
- [Curation Rationale](#curation-rationale)
|
392 |
+
- [Source Data](#source-data)
|
393 |
+
- [Annotations](#annotations)
|
394 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
395 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
396 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
397 |
+
- [Discussion of Biases](#discussion-of-biases)
|
398 |
+
- [Other Known Limitations](#other-known-limitations)
|
399 |
+
- [Additional Information](#additional-information)
|
400 |
+
- [Dataset Curators](#dataset-curators)
|
401 |
+
- [Licensing Information](#licensing-information)
|
402 |
+
- [Citation Information](#citation-information)
|
403 |
+
|
404 |
+
## Dataset Description
|
405 |
+
|
406 |
+
- **Homepage:** http://opus.nlpl.eu/Tatoeba.php
|
407 |
+
- **Repository:** None
|
408 |
+
- **Paper:** http://www.lrec-conf.org/proceedings/lrec2012/pdf/463_Paper.pdf
|
409 |
+
- **Leaderboard:** [More Information Needed]
|
410 |
+
- **Point of Contact:** [More Information Needed]
|
411 |
+
|
412 |
+
### Dataset Summary
|
413 |
+
|
414 |
+
|
415 |
+
To load a language pair which isn't part of the config, all you need to do is specify the language code as pairs.
|
416 |
+
You can find the valid pairs in Homepage section of Dataset Description: http://opus.nlpl.eu/Tatoeba.php
|
417 |
+
E.g.
|
418 |
+
|
419 |
+
`dataset = load_dataset("tatoeba", lang1="en", lang2="he")`
|
420 |
+
|
421 |
+
|
422 |
+
### Supported Tasks and Leaderboards
|
423 |
+
|
424 |
+
[More Information Needed]
|
425 |
+
|
426 |
+
### Languages
|
427 |
+
|
428 |
+
[More Information Needed]
|
429 |
+
|
430 |
+
## Dataset Structure
|
431 |
+
|
432 |
+
### Data Instances
|
433 |
+
|
434 |
+
[More Information Needed]
|
435 |
+
|
436 |
+
### Data Fields
|
437 |
+
|
438 |
+
[More Information Needed]
|
439 |
+
|
440 |
+
### Data Splits
|
441 |
+
|
442 |
+
[More Information Needed]
|
443 |
+
|
444 |
+
## Dataset Creation
|
445 |
+
|
446 |
+
### Curation Rationale
|
447 |
+
|
448 |
+
[More Information Needed]
|
449 |
+
|
450 |
+
### Source Data
|
451 |
+
|
452 |
+
[More Information Needed]
|
453 |
+
|
454 |
+
#### Initial Data Collection and Normalization
|
455 |
+
|
456 |
+
[More Information Needed]
|
457 |
+
|
458 |
+
#### Who are the source language producers?
|
459 |
+
|
460 |
+
[More Information Needed]
|
461 |
+
|
462 |
+
### Annotations
|
463 |
+
|
464 |
+
[More Information Needed]
|
465 |
+
|
466 |
+
#### Annotation process
|
467 |
+
|
468 |
+
[More Information Needed]
|
469 |
+
|
470 |
+
#### Who are the annotators?
|
471 |
+
|
472 |
+
[More Information Needed]
|
473 |
+
|
474 |
+
### Personal and Sensitive Information
|
475 |
+
|
476 |
+
[More Information Needed]
|
477 |
+
|
478 |
+
## Considerations for Using the Data
|
479 |
+
|
480 |
+
### Social Impact of Dataset
|
481 |
+
|
482 |
+
[More Information Needed]
|
483 |
+
|
484 |
+
### Discussion of Biases
|
485 |
+
|
486 |
+
[More Information Needed]
|
487 |
+
|
488 |
+
### Other Known Limitations
|
489 |
+
|
490 |
+
[More Information Needed]
|
491 |
+
|
492 |
+
## Additional Information
|
493 |
+
|
494 |
+
### Dataset Curators
|
495 |
+
|
496 |
+
[More Information Needed]
|
497 |
+
|
498 |
+
### Licensing Information
|
499 |
+
|
500 |
+
[More Information Needed]
|
501 |
+
|
502 |
+
### Citation Information
|
503 |
+
|
504 |
+
[More Information Needed]
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"en-mr": {"description": "This is a collection of translated sentences from Tatoeba\n359 languages, 3,403 bitexts\ntotal number of files: 750\ntotal number of tokens: 65.54M\ntotal number of sentence fragments: 8.96M\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/Tatoeba.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["en", "mr"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "tatoeba", "config_name": "en-mr", "version": {"version_str": "2020.11.9", "description": "", "major": 2020, "minor": 11, "patch": 9}, "splits": {"train": {"name": "train", "num_bytes": 6141771, "num_examples": 53064, "dataset_name": "tatoeba"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-Tatoeba/v2020-11-09/moses/en-mr.txt.zip": {"num_bytes": 1424491, "checksum": "c90bb558ab20f690a340dc3d032616d494b356ace816be9dad2cedc20e2d1350"}}, "download_size": 1424491, "post_processing_size": null, "dataset_size": 6141771, "size_in_bytes": 7566262}, "eo-nl": {"description": "This is a collection of translated sentences from Tatoeba\n359 languages, 3,403 bitexts\ntotal number of files: 750\ntotal number of tokens: 65.54M\ntotal number of sentence fragments: 8.96M\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/Tatoeba.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["eo", "nl"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "tatoeba", "config_name": "eo-nl", "version": {"version_str": "2020.11.9", "description": "", "major": 2020, "minor": 11, "patch": 9}, "splits": {"train": {"name": "train", "num_bytes": 7907890, "num_examples": 90802, "dataset_name": "tatoeba"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-Tatoeba/v2020-11-09/moses/eo-nl.txt.zip": {"num_bytes": 2932630, "checksum": "335da0f7b378749e09f31f0d7f6fead854387b2a3f8cf2ff5d4b7d94eb2cc223"}}, "download_size": 2932630, "post_processing_size": null, "dataset_size": 7907890, "size_in_bytes": 10840520}, "es-pt": {"description": "This is a collection of translated sentences from Tatoeba\n359 languages, 3,403 bitexts\ntotal number of files: 750\ntotal number of tokens: 65.54M\ntotal number of sentence fragments: 8.96M\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/Tatoeba.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["es", "pt"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "tatoeba", "config_name": "es-pt", "version": {"version_str": "2020.11.9", "description": "", "major": 2020, "minor": 11, "patch": 9}, "splits": {"train": {"name": "train", "num_bytes": 6071437, "num_examples": 66832, "dataset_name": "tatoeba"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-Tatoeba/v2020-11-09/moses/es-pt.txt.zip": {"num_bytes": 2298384, "checksum": "a8a1bfbc81e6ac8827d3d627361052276321c826b366a1ef3a0b8a872432cab0"}}, "download_size": 2298384, "post_processing_size": null, "dataset_size": 6071437, "size_in_bytes": 8369821}, "fr-ru": {"description": "This is a collection of translated sentences from Tatoeba\n359 languages, 3,403 bitexts\ntotal number of files: 750\ntotal number of tokens: 65.54M\ntotal number of sentence fragments: 8.96M\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/Tatoeba.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["fr", "ru"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "tatoeba", "config_name": "fr-ru", "version": {"version_str": "2020.11.9", "description": "", "major": 2020, "minor": 11, "patch": 9}, "splits": {"train": {"name": "train", "num_bytes": 19621581, "num_examples": 193663, "dataset_name": "tatoeba"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-Tatoeba/v2020-11-09/moses/fr-ru.txt.zip": {"num_bytes": 5466097, "checksum": "a28d64f1a1c9b587c7323c8d0a8c2c78c271b9d64322ce94edd34b3e8b883387"}}, "download_size": 5466097, "post_processing_size": null, "dataset_size": 19621581, "size_in_bytes": 25087678}, "es-gl": {"description": "This is a collection of translated sentences from Tatoeba\n359 languages, 3,403 bitexts\ntotal number of files: 750\ntotal number of tokens: 65.54M\ntotal number of sentence fragments: 8.96M\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/Tatoeba.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["es", "gl"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "tatoeba", "config_name": "es-gl", "version": {"version_str": "2020.11.9", "description": "", "major": 2020, "minor": 11, "patch": 9}, "splits": {"train": {"name": "train", "num_bytes": 286646, "num_examples": 3129, "dataset_name": "tatoeba"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-Tatoeba/v2020-11-09/moses/es-gl.txt.zip": {"num_bytes": 128012, "checksum": "470b4dc9cfeaad3b4f6f3bcac76e5c5277873839e9792760dc9fa6e247ecf48c"}}, "download_size": 128012, "post_processing_size": null, "dataset_size": 286646, "size_in_bytes": 414658}}
|
dummy/en-mr/2020.11.9/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:54dd02c9bc39625d8c9234fb538de1f86cb5cb0a38b205d89f6d2eaf18564794
|
3 |
+
size 1165
|
dummy/eo-nl/2020.11.9/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d070b15e06c3491ab4305f2df5f51da38c53a6d4460e5fa66b7b228269c24cf1
|
3 |
+
size 1029
|
dummy/es-gl/2020.11.9/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b301196c72b5a30f1be55f020741f4f2365e26ccb7bdd8cee9703e195fad80cf
|
3 |
+
size 1160
|
dummy/es-pt/2020.11.9/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c0e6871fccc04781a75560c1c7a67e869bd2860e2a8a029aa9925816739e17da
|
3 |
+
size 1025
|
dummy/fr-ru/2020.11.9/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9b69134ed601f24d528f04cfd4ca8765ce00c7f930ad74180bc573e26add9bde
|
3 |
+
size 1326
|
tatoeba.py
ADDED
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
This is a collection of translated sentences from Tatoeba
|
24 |
+
359 languages, 3,403 bitexts
|
25 |
+
total number of files: 750
|
26 |
+
total number of tokens: 65.54M
|
27 |
+
total number of sentence fragments: 8.96M
|
28 |
+
"""
|
29 |
+
_HOMEPAGE_URL = "http://opus.nlpl.eu/Tatoeba.php"
|
30 |
+
_CITATION = """\
|
31 |
+
@InProceedings{TIEDEMANN12.463,
|
32 |
+
author = {J{\"o}rg}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 = "2020.11.9"
|
47 |
+
_BASE_NAME = "Tatoeba.{}.{}"
|
48 |
+
_BASE_URL = "https://object.pouta.csc.fi/OPUS-Tatoeba/v2020-11-09/moses/{}-{}.txt.zip"
|
49 |
+
|
50 |
+
# Please note that only few pairs are shown here. You can use config to generate data for all language pairs
|
51 |
+
_LANGUAGE_PAIRS = [
|
52 |
+
("en", "mr"),
|
53 |
+
("eo", "nl"),
|
54 |
+
("es", "pt"),
|
55 |
+
("fr", "ru"),
|
56 |
+
("es", "gl"),
|
57 |
+
]
|
58 |
+
|
59 |
+
|
60 |
+
class TatoebaConfig(datasets.BuilderConfig):
|
61 |
+
def __init__(self, *args, lang1=None, lang2=None, **kwargs):
|
62 |
+
super().__init__(
|
63 |
+
*args,
|
64 |
+
name=f"{lang1}-{lang2}",
|
65 |
+
**kwargs,
|
66 |
+
)
|
67 |
+
self.lang1 = lang1
|
68 |
+
self.lang2 = lang2
|
69 |
+
|
70 |
+
|
71 |
+
class Tatoeba(datasets.GeneratorBasedBuilder):
|
72 |
+
BUILDER_CONFIGS = [
|
73 |
+
TatoebaConfig(
|
74 |
+
lang1=lang1,
|
75 |
+
lang2=lang2,
|
76 |
+
description=f"Translating {lang1} to {lang2} or vice versa",
|
77 |
+
version=datasets.Version(_VERSION),
|
78 |
+
)
|
79 |
+
for lang1, lang2 in _LANGUAGE_PAIRS
|
80 |
+
]
|
81 |
+
BUILDER_CONFIG_CLASS = TatoebaConfig
|
82 |
+
|
83 |
+
def _info(self):
|
84 |
+
return datasets.DatasetInfo(
|
85 |
+
description=_DESCRIPTION,
|
86 |
+
features=datasets.Features(
|
87 |
+
{
|
88 |
+
"id": datasets.Value("string"),
|
89 |
+
"translation": datasets.Translation(languages=(self.config.lang1, self.config.lang2)),
|
90 |
+
},
|
91 |
+
),
|
92 |
+
supervised_keys=None,
|
93 |
+
homepage=_HOMEPAGE_URL,
|
94 |
+
citation=_CITATION,
|
95 |
+
)
|
96 |
+
|
97 |
+
def _split_generators(self, dl_manager):
|
98 |
+
def _base_url(lang1, lang2):
|
99 |
+
return _BASE_URL.format(lang1, lang2)
|
100 |
+
|
101 |
+
download_url = _base_url(self.config.lang1, self.config.lang2)
|
102 |
+
path = dl_manager.download_and_extract(download_url)
|
103 |
+
return [
|
104 |
+
datasets.SplitGenerator(
|
105 |
+
name=datasets.Split.TRAIN,
|
106 |
+
gen_kwargs={"datapath": path},
|
107 |
+
)
|
108 |
+
]
|
109 |
+
|
110 |
+
def _generate_examples(self, datapath):
|
111 |
+
l1, l2 = self.config.lang1, self.config.lang2
|
112 |
+
folder = l1 + "-" + l2
|
113 |
+
l1_file = _BASE_NAME.format(folder, l1)
|
114 |
+
l2_file = _BASE_NAME.format(folder, l2)
|
115 |
+
l1_path = os.path.join(datapath, l1_file)
|
116 |
+
l2_path = os.path.join(datapath, l2_file)
|
117 |
+
with open(l1_path, encoding="utf-8") as f1, open(l2_path, encoding="utf-8") as f2:
|
118 |
+
for sentence_counter, (x, y) in enumerate(zip(f1, f2)):
|
119 |
+
x = x.strip()
|
120 |
+
y = y.strip()
|
121 |
+
result = (
|
122 |
+
sentence_counter,
|
123 |
+
{
|
124 |
+
"id": str(sentence_counter),
|
125 |
+
"translation": {l1: x, l2: y},
|
126 |
+
},
|
127 |
+
)
|
128 |
+
yield result
|