parquet-converter
commited on
Commit
•
4b465ac
1
Parent(s):
050393b
Update parquet files
Browse files- README.md +0 -457
- bn-is/open_subtitles-train.parquet +3 -0
- bs-eo/open_subtitles-train.parquet +3 -0
- da-ru/open_subtitles-train-00000-of-00003.parquet +3 -0
- da-ru/open_subtitles-train-00001-of-00003.parquet +3 -0
- da-ru/open_subtitles-train-00002-of-00003.parquet +3 -0
- dataset_infos.json +0 -1
- en-hi/open_subtitles-train.parquet +3 -0
- fr-hy/open_subtitles-train.parquet +3 -0
- open_subtitles.py +0 -161
README.md
DELETED
@@ -1,457 +0,0 @@
|
|
1 |
-
---
|
2 |
-
annotations_creators:
|
3 |
-
- found
|
4 |
-
language_creators:
|
5 |
-
- found
|
6 |
-
language:
|
7 |
-
- af
|
8 |
-
- ar
|
9 |
-
- bg
|
10 |
-
- bn
|
11 |
-
- br
|
12 |
-
- bs
|
13 |
-
- ca
|
14 |
-
- cs
|
15 |
-
- da
|
16 |
-
- de
|
17 |
-
- el
|
18 |
-
- en
|
19 |
-
- eo
|
20 |
-
- es
|
21 |
-
- et
|
22 |
-
- eu
|
23 |
-
- fa
|
24 |
-
- fi
|
25 |
-
- fr
|
26 |
-
- gl
|
27 |
-
- he
|
28 |
-
- hi
|
29 |
-
- hr
|
30 |
-
- hu
|
31 |
-
- hy
|
32 |
-
- id
|
33 |
-
- is
|
34 |
-
- it
|
35 |
-
- ja
|
36 |
-
- ka
|
37 |
-
- kk
|
38 |
-
- ko
|
39 |
-
- lt
|
40 |
-
- lv
|
41 |
-
- mk
|
42 |
-
- ml
|
43 |
-
- ms
|
44 |
-
- nl
|
45 |
-
- 'no'
|
46 |
-
- pl
|
47 |
-
- pt
|
48 |
-
- ro
|
49 |
-
- ru
|
50 |
-
- si
|
51 |
-
- sk
|
52 |
-
- sl
|
53 |
-
- sq
|
54 |
-
- sr
|
55 |
-
- sv
|
56 |
-
- ta
|
57 |
-
- te
|
58 |
-
- th
|
59 |
-
- tl
|
60 |
-
- tr
|
61 |
-
- uk
|
62 |
-
- ur
|
63 |
-
- vi
|
64 |
-
- zh
|
65 |
-
language_bcp47:
|
66 |
-
- pt-BR
|
67 |
-
- ze-EN
|
68 |
-
- ze-ZH
|
69 |
-
- zh-CN
|
70 |
-
- zh-TW
|
71 |
-
license:
|
72 |
-
- unknown
|
73 |
-
multilinguality:
|
74 |
-
- multilingual
|
75 |
-
size_categories:
|
76 |
-
- 10K<n<100K
|
77 |
-
- 1M<n<10M
|
78 |
-
- n<1K
|
79 |
-
source_datasets:
|
80 |
-
- original
|
81 |
-
task_categories:
|
82 |
-
- translation
|
83 |
-
task_ids: []
|
84 |
-
paperswithcode_id: opensubtitles
|
85 |
-
pretty_name: OpenSubtitles
|
86 |
-
configs:
|
87 |
-
- bn-is
|
88 |
-
- bs-eo
|
89 |
-
- da-ru
|
90 |
-
- en-hi
|
91 |
-
- fr-hy
|
92 |
-
dataset_info:
|
93 |
-
- config_name: bs-eo
|
94 |
-
features:
|
95 |
-
- name: id
|
96 |
-
dtype: string
|
97 |
-
- name: meta
|
98 |
-
struct:
|
99 |
-
- name: year
|
100 |
-
dtype: uint32
|
101 |
-
- name: imdbId
|
102 |
-
dtype: uint32
|
103 |
-
- name: subtitleId
|
104 |
-
struct:
|
105 |
-
- name: bs
|
106 |
-
dtype: uint32
|
107 |
-
- name: eo
|
108 |
-
dtype: uint32
|
109 |
-
- name: sentenceIds
|
110 |
-
struct:
|
111 |
-
- name: bs
|
112 |
-
sequence: uint32
|
113 |
-
- name: eo
|
114 |
-
sequence: uint32
|
115 |
-
- name: translation
|
116 |
-
dtype:
|
117 |
-
translation:
|
118 |
-
languages:
|
119 |
-
- bs
|
120 |
-
- eo
|
121 |
-
splits:
|
122 |
-
- name: train
|
123 |
-
num_bytes: 1204266
|
124 |
-
num_examples: 10989
|
125 |
-
download_size: 333050
|
126 |
-
dataset_size: 1204266
|
127 |
-
- config_name: fr-hy
|
128 |
-
features:
|
129 |
-
- name: id
|
130 |
-
dtype: string
|
131 |
-
- name: meta
|
132 |
-
struct:
|
133 |
-
- name: year
|
134 |
-
dtype: uint32
|
135 |
-
- name: imdbId
|
136 |
-
dtype: uint32
|
137 |
-
- name: subtitleId
|
138 |
-
struct:
|
139 |
-
- name: fr
|
140 |
-
dtype: uint32
|
141 |
-
- name: hy
|
142 |
-
dtype: uint32
|
143 |
-
- name: sentenceIds
|
144 |
-
struct:
|
145 |
-
- name: fr
|
146 |
-
sequence: uint32
|
147 |
-
- name: hy
|
148 |
-
sequence: uint32
|
149 |
-
- name: translation
|
150 |
-
dtype:
|
151 |
-
translation:
|
152 |
-
languages:
|
153 |
-
- fr
|
154 |
-
- hy
|
155 |
-
splits:
|
156 |
-
- name: train
|
157 |
-
num_bytes: 132450
|
158 |
-
num_examples: 668
|
159 |
-
download_size: 41861
|
160 |
-
dataset_size: 132450
|
161 |
-
- config_name: da-ru
|
162 |
-
features:
|
163 |
-
- name: id
|
164 |
-
dtype: string
|
165 |
-
- name: meta
|
166 |
-
struct:
|
167 |
-
- name: year
|
168 |
-
dtype: uint32
|
169 |
-
- name: imdbId
|
170 |
-
dtype: uint32
|
171 |
-
- name: subtitleId
|
172 |
-
struct:
|
173 |
-
- name: da
|
174 |
-
dtype: uint32
|
175 |
-
- name: ru
|
176 |
-
dtype: uint32
|
177 |
-
- name: sentenceIds
|
178 |
-
struct:
|
179 |
-
- name: da
|
180 |
-
sequence: uint32
|
181 |
-
- name: ru
|
182 |
-
sequence: uint32
|
183 |
-
- name: translation
|
184 |
-
dtype:
|
185 |
-
translation:
|
186 |
-
languages:
|
187 |
-
- da
|
188 |
-
- ru
|
189 |
-
splits:
|
190 |
-
- name: train
|
191 |
-
num_bytes: 1082649105
|
192 |
-
num_examples: 7543012
|
193 |
-
download_size: 267995167
|
194 |
-
dataset_size: 1082649105
|
195 |
-
- config_name: en-hi
|
196 |
-
features:
|
197 |
-
- name: id
|
198 |
-
dtype: string
|
199 |
-
- name: meta
|
200 |
-
struct:
|
201 |
-
- name: year
|
202 |
-
dtype: uint32
|
203 |
-
- name: imdbId
|
204 |
-
dtype: uint32
|
205 |
-
- name: subtitleId
|
206 |
-
struct:
|
207 |
-
- name: en
|
208 |
-
dtype: uint32
|
209 |
-
- name: hi
|
210 |
-
dtype: uint32
|
211 |
-
- name: sentenceIds
|
212 |
-
struct:
|
213 |
-
- name: en
|
214 |
-
sequence: uint32
|
215 |
-
- name: hi
|
216 |
-
sequence: uint32
|
217 |
-
- name: translation
|
218 |
-
dtype:
|
219 |
-
translation:
|
220 |
-
languages:
|
221 |
-
- en
|
222 |
-
- hi
|
223 |
-
splits:
|
224 |
-
- name: train
|
225 |
-
num_bytes: 13845544
|
226 |
-
num_examples: 93016
|
227 |
-
download_size: 2967295
|
228 |
-
dataset_size: 13845544
|
229 |
-
- config_name: bn-is
|
230 |
-
features:
|
231 |
-
- name: id
|
232 |
-
dtype: string
|
233 |
-
- name: meta
|
234 |
-
struct:
|
235 |
-
- name: year
|
236 |
-
dtype: uint32
|
237 |
-
- name: imdbId
|
238 |
-
dtype: uint32
|
239 |
-
- name: subtitleId
|
240 |
-
struct:
|
241 |
-
- name: bn
|
242 |
-
dtype: uint32
|
243 |
-
- name: is
|
244 |
-
dtype: uint32
|
245 |
-
- name: sentenceIds
|
246 |
-
struct:
|
247 |
-
- name: bn
|
248 |
-
sequence: uint32
|
249 |
-
- name: is
|
250 |
-
sequence: uint32
|
251 |
-
- name: translation
|
252 |
-
dtype:
|
253 |
-
translation:
|
254 |
-
languages:
|
255 |
-
- bn
|
256 |
-
- is
|
257 |
-
splits:
|
258 |
-
- name: train
|
259 |
-
num_bytes: 6371251
|
260 |
-
num_examples: 38272
|
261 |
-
download_size: 1411625
|
262 |
-
dataset_size: 6371251
|
263 |
-
---
|
264 |
-
|
265 |
-
# Dataset Card for OpenSubtitles
|
266 |
-
|
267 |
-
## Table of Contents
|
268 |
-
- [Dataset Description](#dataset-description)
|
269 |
-
- [Dataset Summary](#dataset-summary)
|
270 |
-
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
271 |
-
- [Languages](#languages)
|
272 |
-
- [Dataset Structure](#dataset-structure)
|
273 |
-
- [Data Instances](#data-instances)
|
274 |
-
- [Data Fields](#data-fields)
|
275 |
-
- [Data Splits](#data-splits)
|
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 |
-
- [Contributions](#contributions)
|
290 |
-
|
291 |
-
## Dataset Description
|
292 |
-
|
293 |
-
- **Homepage:** http://opus.nlpl.eu/OpenSubtitles.php
|
294 |
-
- **Repository:** None
|
295 |
-
- **Paper:** http://www.lrec-conf.org/proceedings/lrec2016/pdf/62_Paper.pdf
|
296 |
-
- **Leaderboard:** [More Information Needed]
|
297 |
-
- **Point of Contact:** [More Information Needed]
|
298 |
-
|
299 |
-
### Dataset Summary
|
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/OpenSubtitles.php
|
303 |
-
E.g.
|
304 |
-
|
305 |
-
`dataset = load_dataset("open_subtitles", lang1="fi", lang2="hi")`
|
306 |
-
|
307 |
-
|
308 |
-
### Supported Tasks and Leaderboards
|
309 |
-
|
310 |
-
[More Information Needed]
|
311 |
-
|
312 |
-
### Languages
|
313 |
-
|
314 |
-
The languages in the dataset are:
|
315 |
-
- af
|
316 |
-
- ar
|
317 |
-
- bg
|
318 |
-
- bn
|
319 |
-
- br
|
320 |
-
- bs
|
321 |
-
- ca
|
322 |
-
- cs
|
323 |
-
- da
|
324 |
-
- de
|
325 |
-
- el
|
326 |
-
- en
|
327 |
-
- eo
|
328 |
-
- es
|
329 |
-
- et
|
330 |
-
- eu
|
331 |
-
- fa
|
332 |
-
- fi
|
333 |
-
- fr
|
334 |
-
- gl
|
335 |
-
- he
|
336 |
-
- hi
|
337 |
-
- hr
|
338 |
-
- hu
|
339 |
-
- hy
|
340 |
-
- id
|
341 |
-
- is
|
342 |
-
- it
|
343 |
-
- ja
|
344 |
-
- ka
|
345 |
-
- kk
|
346 |
-
- ko
|
347 |
-
- lt
|
348 |
-
- lv
|
349 |
-
- mk
|
350 |
-
- ml
|
351 |
-
- ms
|
352 |
-
- nl
|
353 |
-
- no
|
354 |
-
- pl
|
355 |
-
- pt
|
356 |
-
- pt_br: Portuguese (Brazil) (pt-BR)
|
357 |
-
- ro
|
358 |
-
- ru
|
359 |
-
- si
|
360 |
-
- sk
|
361 |
-
- sl
|
362 |
-
- sq
|
363 |
-
- sr
|
364 |
-
- sv
|
365 |
-
- ta
|
366 |
-
- te
|
367 |
-
- th
|
368 |
-
- tl
|
369 |
-
- tr
|
370 |
-
- uk
|
371 |
-
- ur
|
372 |
-
- vi
|
373 |
-
- ze_en: English constituent of Bilingual Chinese-English (subtitles displaying two languages at once, one per line)
|
374 |
-
- ze_zh: Chinese constituent of Bilingual Chinese-English (subtitles displaying two languages at once, one per line)
|
375 |
-
- zh_cn: Simplified Chinese (zh-CN, `zh-Hans`)
|
376 |
-
- zh_tw: Traditional Chinese (zh-TW, `zh-Hant`)
|
377 |
-
|
378 |
-
## Dataset Structure
|
379 |
-
|
380 |
-
### Data Instances
|
381 |
-
|
382 |
-
Here are some examples of questions and facts:
|
383 |
-
|
384 |
-
|
385 |
-
### Data Fields
|
386 |
-
|
387 |
-
[More Information Needed]
|
388 |
-
|
389 |
-
### Data Splits
|
390 |
-
|
391 |
-
[More Information Needed]
|
392 |
-
|
393 |
-
## Dataset Creation
|
394 |
-
|
395 |
-
### Curation Rationale
|
396 |
-
|
397 |
-
[More Information Needed]
|
398 |
-
|
399 |
-
### Source Data
|
400 |
-
|
401 |
-
[More Information Needed]
|
402 |
-
|
403 |
-
#### Initial Data Collection and Normalization
|
404 |
-
|
405 |
-
[More Information Needed]
|
406 |
-
|
407 |
-
#### Who are the source language producers?
|
408 |
-
|
409 |
-
[More Information Needed]
|
410 |
-
|
411 |
-
### Annotations
|
412 |
-
|
413 |
-
[More Information Needed]
|
414 |
-
|
415 |
-
#### Annotation process
|
416 |
-
|
417 |
-
[More Information Needed]
|
418 |
-
|
419 |
-
#### Who are the annotators?
|
420 |
-
|
421 |
-
[More Information Needed]
|
422 |
-
|
423 |
-
### Personal and Sensitive Information
|
424 |
-
|
425 |
-
[More Information Needed]
|
426 |
-
|
427 |
-
## Considerations for Using the Data
|
428 |
-
|
429 |
-
### Social Impact of Dataset
|
430 |
-
|
431 |
-
[More Information Needed]
|
432 |
-
|
433 |
-
### Discussion of Biases
|
434 |
-
|
435 |
-
[More Information Needed]
|
436 |
-
|
437 |
-
### Other Known Limitations
|
438 |
-
|
439 |
-
[More Information Needed]
|
440 |
-
|
441 |
-
## Additional Information
|
442 |
-
|
443 |
-
### Dataset Curators
|
444 |
-
|
445 |
-
[More Information Needed]
|
446 |
-
|
447 |
-
### Licensing Information
|
448 |
-
|
449 |
-
[More Information Needed]
|
450 |
-
|
451 |
-
### Citation Information
|
452 |
-
|
453 |
-
[More Information Needed]
|
454 |
-
|
455 |
-
### Contributions
|
456 |
-
|
457 |
-
Thanks to [@abhishekkrthakur](https://github.com/abhishekkrthakur) for adding this dataset.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bn-is/open_subtitles-train.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a57e1539b787a16342dab93bf4404de51693fcdd1f58f93bd63c980af20b5a28
|
3 |
+
size 3192496
|
bs-eo/open_subtitles-train.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d1ee03751ccc4886f94ec863a8d9df5b55b870648704c8eaf315d246784d04fd
|
3 |
+
size 737828
|
da-ru/open_subtitles-train-00000-of-00003.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f03107258f3e89594f0906665146a3594bb81165b7fe268eeb80fa414747c128
|
3 |
+
size 272956197
|
da-ru/open_subtitles-train-00001-of-00003.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8815deeb3571e835491231fd4a894a381a2423d982d64f22c32307433db63f90
|
3 |
+
size 270036564
|
da-ru/open_subtitles-train-00002-of-00003.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6d7c8ecd9d11c74573b67694bf383fd8bf0a49a8744c1c852ffc4a0ff6c4dcc4
|
3 |
+
size 47164786
|
dataset_infos.json
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"bs-eo": {"description": "This is a new collection of translated movie subtitles from http://www.opensubtitles.org/.\n\nIMPORTANT: If you use the OpenSubtitle corpus: Please, add a link to http://www.opensubtitles.org/ to your website and to your reports and publications produced with the data!\n\nThis is a slightly cleaner version of the subtitle collection using improved sentence alignment and better language checking.\n\n62 languages, 1,782 bitexts\ntotal number of files: 3,735,070\ntotal number of tokens: 22.10G\ntotal number of sentence fragments: 3.35G\n", "citation": "P. Lison and J. Tiedemann, 2016, OpenSubtitles2016: Extracting Large Parallel Corpora from Movie and TV Subtitles. In Proceedings of the 10th International Conference on Language Resources and Evaluation (LREC 2016)\n", "homepage": "http://opus.nlpl.eu/OpenSubtitles.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "meta": {"year": {"dtype": "uint32", "id": null, "_type": "Value"}, "imdbId": {"dtype": "uint32", "id": null, "_type": "Value"}, "subtitleId": {"bs": {"dtype": "uint32", "id": null, "_type": "Value"}, "eo": {"dtype": "uint32", "id": null, "_type": "Value"}}, "sentenceIds": {"bs": {"feature": {"dtype": "uint32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "eo": {"feature": {"dtype": "uint32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}}, "translation": {"languages": ["bs", "eo"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "open_subtitles", "config_name": "bs-eo", "version": {"version_str": "2018.0.0", "description": null, "major": 2018, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1204266, "num_examples": 10989, "dataset_name": "open_subtitles"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-OpenSubtitles/v2018/moses/bs-eo.txt.zip": {"num_bytes": 333050, "checksum": "47bad0c4bc1d63d10d601708ffaf637ee3eef1e289521cd009812e84ef338fbc"}}, "download_size": 333050, "post_processing_size": null, "dataset_size": 1204266, "size_in_bytes": 1537316}, "fr-hy": {"description": "This is a new collection of translated movie subtitles from http://www.opensubtitles.org/.\n\nIMPORTANT: If you use the OpenSubtitle corpus: Please, add a link to http://www.opensubtitles.org/ to your website and to your reports and publications produced with the data!\n\nThis is a slightly cleaner version of the subtitle collection using improved sentence alignment and better language checking.\n\n62 languages, 1,782 bitexts\ntotal number of files: 3,735,070\ntotal number of tokens: 22.10G\ntotal number of sentence fragments: 3.35G\n", "citation": "P. Lison and J. Tiedemann, 2016, OpenSubtitles2016: Extracting Large Parallel Corpora from Movie and TV Subtitles. In Proceedings of the 10th International Conference on Language Resources and Evaluation (LREC 2016)\n", "homepage": "http://opus.nlpl.eu/OpenSubtitles.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "meta": {"year": {"dtype": "uint32", "id": null, "_type": "Value"}, "imdbId": {"dtype": "uint32", "id": null, "_type": "Value"}, "subtitleId": {"fr": {"dtype": "uint32", "id": null, "_type": "Value"}, "hy": {"dtype": "uint32", "id": null, "_type": "Value"}}, "sentenceIds": {"fr": {"feature": {"dtype": "uint32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "hy": {"feature": {"dtype": "uint32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}}, "translation": {"languages": ["fr", "hy"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "open_subtitles", "config_name": "fr-hy", "version": {"version_str": "2018.0.0", "description": null, "major": 2018, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 132450, "num_examples": 668, "dataset_name": "open_subtitles"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-OpenSubtitles/v2018/moses/fr-hy.txt.zip": {"num_bytes": 41861, "checksum": "2f1b42fc7b7856b466b73b02860f68e90ee4a12f3327e9114e87d26a9b5e77cd"}}, "download_size": 41861, "post_processing_size": null, "dataset_size": 132450, "size_in_bytes": 174311}, "da-ru": {"description": "This is a new collection of translated movie subtitles from http://www.opensubtitles.org/.\n\nIMPORTANT: If you use the OpenSubtitle corpus: Please, add a link to http://www.opensubtitles.org/ to your website and to your reports and publications produced with the data!\n\nThis is a slightly cleaner version of the subtitle collection using improved sentence alignment and better language checking.\n\n62 languages, 1,782 bitexts\ntotal number of files: 3,735,070\ntotal number of tokens: 22.10G\ntotal number of sentence fragments: 3.35G\n", "citation": "P. Lison and J. Tiedemann, 2016, OpenSubtitles2016: Extracting Large Parallel Corpora from Movie and TV Subtitles. In Proceedings of the 10th International Conference on Language Resources and Evaluation (LREC 2016)\n", "homepage": "http://opus.nlpl.eu/OpenSubtitles.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "meta": {"year": {"dtype": "uint32", "id": null, "_type": "Value"}, "imdbId": {"dtype": "uint32", "id": null, "_type": "Value"}, "subtitleId": {"da": {"dtype": "uint32", "id": null, "_type": "Value"}, "ru": {"dtype": "uint32", "id": null, "_type": "Value"}}, "sentenceIds": {"da": {"feature": {"dtype": "uint32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "ru": {"feature": {"dtype": "uint32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}}, "translation": {"languages": ["da", "ru"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "open_subtitles", "config_name": "da-ru", "version": {"version_str": "2018.0.0", "description": null, "major": 2018, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1082649105, "num_examples": 7543012, "dataset_name": "open_subtitles"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-OpenSubtitles/v2018/moses/da-ru.txt.zip": {"num_bytes": 267995167, "checksum": "c9fae94d519a6bd6374f1dea8550ba535cabfb3a4e8b92eeb5921e8981bde98a"}}, "download_size": 267995167, "post_processing_size": null, "dataset_size": 1082649105, "size_in_bytes": 1350644272}, "en-hi": {"description": "This is a new collection of translated movie subtitles from http://www.opensubtitles.org/.\n\nIMPORTANT: If you use the OpenSubtitle corpus: Please, add a link to http://www.opensubtitles.org/ to your website and to your reports and publications produced with the data!\n\nThis is a slightly cleaner version of the subtitle collection using improved sentence alignment and better language checking.\n\n62 languages, 1,782 bitexts\ntotal number of files: 3,735,070\ntotal number of tokens: 22.10G\ntotal number of sentence fragments: 3.35G\n", "citation": "P. Lison and J. Tiedemann, 2016, OpenSubtitles2016: Extracting Large Parallel Corpora from Movie and TV Subtitles. In Proceedings of the 10th International Conference on Language Resources and Evaluation (LREC 2016)\n", "homepage": "http://opus.nlpl.eu/OpenSubtitles.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "meta": {"year": {"dtype": "uint32", "id": null, "_type": "Value"}, "imdbId": {"dtype": "uint32", "id": null, "_type": "Value"}, "subtitleId": {"en": {"dtype": "uint32", "id": null, "_type": "Value"}, "hi": {"dtype": "uint32", "id": null, "_type": "Value"}}, "sentenceIds": {"en": {"feature": {"dtype": "uint32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "hi": {"feature": {"dtype": "uint32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}}, "translation": {"languages": ["en", "hi"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "open_subtitles", "config_name": "en-hi", "version": {"version_str": "2018.0.0", "description": null, "major": 2018, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 13845544, "num_examples": 93016, "dataset_name": "open_subtitles"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-OpenSubtitles/v2018/moses/en-hi.txt.zip": {"num_bytes": 2967295, "checksum": "3e099b7738ec2fdcf47e6d7a4363b6435bf63a34f703168b086e742a8bc9f4ed"}}, "download_size": 2967295, "post_processing_size": null, "dataset_size": 13845544, "size_in_bytes": 16812839}, "bn-is": {"description": "This is a new collection of translated movie subtitles from http://www.opensubtitles.org/.\n\nIMPORTANT: If you use the OpenSubtitle corpus: Please, add a link to http://www.opensubtitles.org/ to your website and to your reports and publications produced with the data!\n\nThis is a slightly cleaner version of the subtitle collection using improved sentence alignment and better language checking.\n\n62 languages, 1,782 bitexts\ntotal number of files: 3,735,070\ntotal number of tokens: 22.10G\ntotal number of sentence fragments: 3.35G\n", "citation": "P. Lison and J. Tiedemann, 2016, OpenSubtitles2016: Extracting Large Parallel Corpora from Movie and TV Subtitles. In Proceedings of the 10th International Conference on Language Resources and Evaluation (LREC 2016)\n", "homepage": "http://opus.nlpl.eu/OpenSubtitles.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "meta": {"year": {"dtype": "uint32", "id": null, "_type": "Value"}, "imdbId": {"dtype": "uint32", "id": null, "_type": "Value"}, "subtitleId": {"bn": {"dtype": "uint32", "id": null, "_type": "Value"}, "is": {"dtype": "uint32", "id": null, "_type": "Value"}}, "sentenceIds": {"bn": {"feature": {"dtype": "uint32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "is": {"feature": {"dtype": "uint32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}}, "translation": {"languages": ["bn", "is"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "open_subtitles", "config_name": "bn-is", "version": {"version_str": "2018.0.0", "description": null, "major": 2018, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 6371251, "num_examples": 38272, "dataset_name": "open_subtitles"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-OpenSubtitles/v2018/moses/bn-is.txt.zip": {"num_bytes": 1411625, "checksum": "06ff1ed8e20cee1123046accb7e99f40ecf0263c2677b371a04ee80951c5a23f"}}, "download_size": 1411625, "post_processing_size": null, "dataset_size": 6371251, "size_in_bytes": 7782876}}
|
|
|
|
en-hi/open_subtitles-train.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:53b5df89537c4d06bef1f1ca9af02f7388d16d1a9f7694ab96c22495c9ab491e
|
3 |
+
size 6740353
|
fr-hy/open_subtitles-train.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f22983530743e9029b2e1564e35f08d078fb285d07a43e18029f6e84cdf8908a
|
3 |
+
size 83690
|
open_subtitles.py
DELETED
@@ -1,161 +0,0 @@
|
|
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 new collection of translated movie subtitles from http://www.opensubtitles.org/.
|
24 |
-
|
25 |
-
IMPORTANT: If you use the OpenSubtitle corpus: Please, add a link to http://www.opensubtitles.org/ to your website and to your reports and publications produced with the data!
|
26 |
-
|
27 |
-
This is a slightly cleaner version of the subtitle collection using improved sentence alignment and better language checking.
|
28 |
-
|
29 |
-
62 languages, 1,782 bitexts
|
30 |
-
total number of files: 3,735,070
|
31 |
-
total number of tokens: 22.10G
|
32 |
-
total number of sentence fragments: 3.35G
|
33 |
-
"""
|
34 |
-
_HOMEPAGE_URL = "http://opus.nlpl.eu/OpenSubtitles.php"
|
35 |
-
_CITATION = """\
|
36 |
-
P. Lison and J. Tiedemann, 2016, OpenSubtitles2016: Extracting Large Parallel Corpora from Movie and TV Subtitles. In Proceedings of the 10th International Conference on Language Resources and Evaluation (LREC 2016)
|
37 |
-
"""
|
38 |
-
|
39 |
-
_VERSION = "2018.0.0"
|
40 |
-
_BASE_NAME = "OpenSubtitles.{}.{}"
|
41 |
-
_BASE_URL = "https://object.pouta.csc.fi/OPUS-OpenSubtitles/v2018/moses/{}-{}.txt.zip"
|
42 |
-
|
43 |
-
# Please note that only few pairs are shown here. You can use config to generate data for all language pairs
|
44 |
-
_LANGUAGE_PAIRS = [
|
45 |
-
("bs", "eo"),
|
46 |
-
("fr", "hy"),
|
47 |
-
("da", "ru"),
|
48 |
-
("en", "hi"),
|
49 |
-
("bn", "is"),
|
50 |
-
]
|
51 |
-
|
52 |
-
|
53 |
-
class OpenSubtitlesConfig(datasets.BuilderConfig):
|
54 |
-
def __init__(self, *args, lang1=None, lang2=None, **kwargs):
|
55 |
-
super().__init__(
|
56 |
-
*args,
|
57 |
-
name=f"{lang1}-{lang2}",
|
58 |
-
**kwargs,
|
59 |
-
)
|
60 |
-
self.lang1 = lang1
|
61 |
-
self.lang2 = lang2
|
62 |
-
|
63 |
-
|
64 |
-
class OpenSubtitles(datasets.GeneratorBasedBuilder):
|
65 |
-
BUILDER_CONFIGS = [
|
66 |
-
OpenSubtitlesConfig(
|
67 |
-
lang1=lang1,
|
68 |
-
lang2=lang2,
|
69 |
-
description=f"Translating {lang1} to {lang2} or vice versa",
|
70 |
-
version=datasets.Version(_VERSION),
|
71 |
-
)
|
72 |
-
for lang1, lang2 in _LANGUAGE_PAIRS
|
73 |
-
]
|
74 |
-
BUILDER_CONFIG_CLASS = OpenSubtitlesConfig
|
75 |
-
|
76 |
-
def _info(self):
|
77 |
-
return datasets.DatasetInfo(
|
78 |
-
description=_DESCRIPTION,
|
79 |
-
features=datasets.Features(
|
80 |
-
{
|
81 |
-
"id": datasets.Value("string"),
|
82 |
-
"meta": {
|
83 |
-
"year": datasets.Value("uint32"),
|
84 |
-
"imdbId": datasets.Value("uint32"),
|
85 |
-
"subtitleId": {
|
86 |
-
self.config.lang1: datasets.Value("uint32"),
|
87 |
-
self.config.lang2: datasets.Value("uint32"),
|
88 |
-
},
|
89 |
-
"sentenceIds": {
|
90 |
-
self.config.lang1: datasets.Sequence(datasets.Value("uint32")),
|
91 |
-
self.config.lang2: datasets.Sequence(datasets.Value("uint32")),
|
92 |
-
},
|
93 |
-
},
|
94 |
-
"translation": datasets.Translation(languages=(self.config.lang1, self.config.lang2)),
|
95 |
-
},
|
96 |
-
),
|
97 |
-
supervised_keys=None,
|
98 |
-
homepage=_HOMEPAGE_URL,
|
99 |
-
citation=_CITATION,
|
100 |
-
)
|
101 |
-
|
102 |
-
def _split_generators(self, dl_manager):
|
103 |
-
def _base_url(lang1, lang2):
|
104 |
-
return _BASE_URL.format(lang1, lang2)
|
105 |
-
|
106 |
-
download_url = _base_url(self.config.lang1, self.config.lang2)
|
107 |
-
path = dl_manager.download_and_extract(download_url)
|
108 |
-
return [
|
109 |
-
datasets.SplitGenerator(
|
110 |
-
name=datasets.Split.TRAIN,
|
111 |
-
gen_kwargs={"datapath": path},
|
112 |
-
)
|
113 |
-
]
|
114 |
-
|
115 |
-
@classmethod
|
116 |
-
def _extract_info(cls, sentence_id):
|
117 |
-
# see https://github.com/huggingface/datasets/issues/1844
|
118 |
-
# sentence ids have the following format: en/2017/7006210/7050201.xml.gz
|
119 |
-
# lang/year/imdb_id/opensubtitles_id.xml.gz
|
120 |
-
parts = sentence_id[: -len(".xml.gz")].split("/")
|
121 |
-
parts.pop(0) # remove lang, we do not need it
|
122 |
-
|
123 |
-
# returns year, imdb_id, opensubtitles_id
|
124 |
-
return tuple(map(int, parts))
|
125 |
-
|
126 |
-
def _generate_examples(self, datapath):
|
127 |
-
l1, l2 = self.config.lang1, self.config.lang2
|
128 |
-
folder = l1 + "-" + l2
|
129 |
-
l1_file = _BASE_NAME.format(folder, l1)
|
130 |
-
l2_file = _BASE_NAME.format(folder, l2)
|
131 |
-
ids_file = _BASE_NAME.format(folder, "ids")
|
132 |
-
l1_path = os.path.join(datapath, l1_file)
|
133 |
-
l2_path = os.path.join(datapath, l2_file)
|
134 |
-
ids_path = os.path.join(datapath, ids_file)
|
135 |
-
with open(l1_path, encoding="utf-8") as f1, open(l2_path, encoding="utf-8") as f2, open(
|
136 |
-
ids_path, encoding="utf-8"
|
137 |
-
) as f3:
|
138 |
-
for sentence_counter, (x, y, _id) in enumerate(zip(f1, f2, f3)):
|
139 |
-
x = x.strip()
|
140 |
-
y = y.strip()
|
141 |
-
l1_id, l2_id, l1_sid, l2_sid = _id.split("\t")
|
142 |
-
year, imdb_id, l1_subtitle_id = self._extract_info(l1_id)
|
143 |
-
_, _, l2_subtitle_id = self._extract_info(l2_id)
|
144 |
-
l1_sentence_ids = list(map(int, l1_sid.split(" ")))
|
145 |
-
l2_sentence_ids = list(map(int, l2_sid.split(" ")))
|
146 |
-
|
147 |
-
result = (
|
148 |
-
sentence_counter,
|
149 |
-
{
|
150 |
-
"id": str(sentence_counter),
|
151 |
-
"meta": {
|
152 |
-
"year": year,
|
153 |
-
"imdbId": imdb_id,
|
154 |
-
"subtitleId": {l1: l1_subtitle_id, l2: l2_subtitle_id},
|
155 |
-
"sentenceIds": {l1: l1_sentence_ids, l2: l2_sentence_ids},
|
156 |
-
},
|
157 |
-
"translation": {l1: x, l2: y},
|
158 |
-
},
|
159 |
-
)
|
160 |
-
sentence_counter += 1
|
161 |
-
yield result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|