Datasets:
Commit
•
85cc7a3
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 +198 -0
- dataset_infos.json +1 -0
- dummy/de-pl/1.0.0/dummy_data.zip +3 -0
- dummy/el-en/1.0.0/dummy_data.zip +3 -0
- dummy/en-ha/1.0.0/dummy_data.zip +3 -0
- dummy/en-ig/1.0.0/dummy_data.zip +3 -0
- dummy/en-km/1.0.0/dummy_data.zip +3 -0
- dummy/en-so/1.0.0/dummy_data.zip +3 -0
- dummy/en-sw/1.0.0/dummy_data.zip +3 -0
- dummy/en-tl/1.0.0/dummy_data.zip +3 -0
- dummy/es-gl/1.0.0/dummy_data.zip +3 -0
- dummy/fr-nl/1.0.0/dummy_data.zip +3 -0
- opus_paracrawl.py +130 -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,198 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- found
|
4 |
+
language_creators:
|
5 |
+
- found
|
6 |
+
languages:
|
7 |
+
- bg
|
8 |
+
- ca
|
9 |
+
- cs
|
10 |
+
- da
|
11 |
+
- de
|
12 |
+
- el
|
13 |
+
- en
|
14 |
+
- es
|
15 |
+
- et
|
16 |
+
- eu
|
17 |
+
- fi
|
18 |
+
- fr
|
19 |
+
- ga
|
20 |
+
- gl
|
21 |
+
- ha
|
22 |
+
- hr
|
23 |
+
- hu
|
24 |
+
- ig
|
25 |
+
- is
|
26 |
+
- it
|
27 |
+
- km
|
28 |
+
- lt
|
29 |
+
- lv
|
30 |
+
- mt
|
31 |
+
- my
|
32 |
+
- nb
|
33 |
+
- ne
|
34 |
+
- nl
|
35 |
+
- nn
|
36 |
+
- pl
|
37 |
+
- pt
|
38 |
+
- ro
|
39 |
+
- ru
|
40 |
+
- si
|
41 |
+
- sk
|
42 |
+
- sl
|
43 |
+
- so
|
44 |
+
- sv
|
45 |
+
- sw
|
46 |
+
- tl
|
47 |
+
|
48 |
+
licenses:
|
49 |
+
- cc0-1-0
|
50 |
+
multilinguality:
|
51 |
+
- multilingual
|
52 |
+
size_categories:
|
53 |
+
- 10K<n<100K
|
54 |
+
source_datasets:
|
55 |
+
- original
|
56 |
+
task_categories:
|
57 |
+
- conditional-text-generation
|
58 |
+
task_ids:
|
59 |
+
- machine-translation
|
60 |
+
---
|
61 |
+
|
62 |
+
# Dataset Card Creation Guide
|
63 |
+
|
64 |
+
## Table of Contents
|
65 |
+
|
66 |
+
- [Dataset Description](#dataset-description)
|
67 |
+
- [Dataset Summary](#dataset-summary)
|
68 |
+
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
69 |
+
- [Languages](#languages)
|
70 |
+
- [Dataset Structure](#dataset-structure)
|
71 |
+
- [Data Instances](#data-instances)
|
72 |
+
- [Data Fields](#data-instances)
|
73 |
+
- [Data Splits](#data-instances)
|
74 |
+
- [Dataset Creation](#dataset-creation)
|
75 |
+
- [Curation Rationale](#curation-rationale)
|
76 |
+
- [Source Data](#source-data)
|
77 |
+
- [Annotations](#annotations)
|
78 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
79 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
80 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
81 |
+
- [Discussion of Biases](#discussion-of-biases)
|
82 |
+
- [Other Known Limitations](#other-known-limitations)
|
83 |
+
- [Additional Information](#additional-information)
|
84 |
+
- [Dataset Curators](#dataset-curators)
|
85 |
+
- [Licensing Information](#licensing-information)
|
86 |
+
- [Citation Information](#citation-information)
|
87 |
+
|
88 |
+
## Dataset Description
|
89 |
+
|
90 |
+
- **Homepage:** http://opus.nlpl.eu/ParaCrawl.php
|
91 |
+
- **Repository:** None
|
92 |
+
- **Paper:** http://www.lrec-conf.org/proceedings/lrec2012/pdf/463_Paper.pdf
|
93 |
+
- **Leaderboard:** [More Information Needed]
|
94 |
+
- **Point of Contact:** [More Information Needed]
|
95 |
+
|
96 |
+
### Dataset Summary
|
97 |
+
|
98 |
+
To load a language pair which isn't part of the config, all you need to do is specify the language code as pairs.
|
99 |
+
You can find the valid pairs in Homepage section of Dataset Description: http://opus.nlpl.eu/ParaCrawl.php
|
100 |
+
E.g.
|
101 |
+
|
102 |
+
`dataset = load_dataset("paracrawl", lang1="en", lang2="so")`
|
103 |
+
|
104 |
+
### Supported Tasks and Leaderboards
|
105 |
+
|
106 |
+
[More Information Needed]
|
107 |
+
|
108 |
+
### Languages
|
109 |
+
|
110 |
+
[More Information Needed]
|
111 |
+
|
112 |
+
## Dataset Structure
|
113 |
+
|
114 |
+
### Data Instances
|
115 |
+
|
116 |
+
[More Information Needed]
|
117 |
+
|
118 |
+
### Data Fields
|
119 |
+
|
120 |
+
[More Information Needed]
|
121 |
+
|
122 |
+
### Data Splits
|
123 |
+
|
124 |
+
[More Information Needed]
|
125 |
+
|
126 |
+
## Dataset Creation
|
127 |
+
|
128 |
+
### Curation Rationale
|
129 |
+
|
130 |
+
[More Information Needed]
|
131 |
+
|
132 |
+
### Source Data
|
133 |
+
|
134 |
+
[More Information Needed]
|
135 |
+
|
136 |
+
#### Initial Data Collection and Normalization
|
137 |
+
|
138 |
+
[More Information Needed]
|
139 |
+
|
140 |
+
#### Who are the source language producers?
|
141 |
+
|
142 |
+
[More Information Needed]
|
143 |
+
|
144 |
+
### Annotations
|
145 |
+
|
146 |
+
[More Information Needed]
|
147 |
+
|
148 |
+
#### Annotation process
|
149 |
+
|
150 |
+
[More Information Needed]
|
151 |
+
|
152 |
+
#### Who are the annotators?
|
153 |
+
|
154 |
+
[More Information Needed]
|
155 |
+
|
156 |
+
### Personal and Sensitive Information
|
157 |
+
|
158 |
+
[More Information Needed]
|
159 |
+
|
160 |
+
## Considerations for Using the Data
|
161 |
+
|
162 |
+
### Social Impact of Dataset
|
163 |
+
|
164 |
+
[More Information Needed]
|
165 |
+
|
166 |
+
### Discussion of Biases
|
167 |
+
|
168 |
+
[More Information Needed]
|
169 |
+
|
170 |
+
### Other Known Limitations
|
171 |
+
|
172 |
+
[More Information Needed]
|
173 |
+
|
174 |
+
## Additional Information
|
175 |
+
|
176 |
+
### Dataset Curators
|
177 |
+
|
178 |
+
[More Information Needed]
|
179 |
+
|
180 |
+
### Licensing Information
|
181 |
+
|
182 |
+
- Creative commons CC0 (no rights reserved)
|
183 |
+
|
184 |
+
### Citation Information
|
185 |
+
|
186 |
+
@InProceedings{TIEDEMANN12.463,
|
187 |
+
author = {J{\"o}rg Tiedemann},
|
188 |
+
title = {Parallel Data, Tools and Interfaces in OPUS},
|
189 |
+
booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)},
|
190 |
+
year = {2012},
|
191 |
+
month = {may},
|
192 |
+
date = {23-25},
|
193 |
+
address = {Istanbul, Turkey},
|
194 |
+
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},
|
195 |
+
publisher = {European Language Resources Association (ELRA)},
|
196 |
+
isbn = {978-2-9517408-7-7},
|
197 |
+
language = {english}
|
198 |
+
}
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"el-en": {"description": "Parallel corpora from Web Crawls collected in the ParaCrawl project\n40 languages, 41 bitexts\ntotal number of files: 20,995\ntotal number of tokens: 21.40G\ntotal number of sentence fragments: 1.12G\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J{\"o}rg 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/ParaCrawl.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["el", "en"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_para_crawl", "config_name": "el-en", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 3184968051, "num_examples": 9402646, "dataset_name": "opus_para_crawl"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-ParaCrawl/v7.1/moses/el-en.txt.zip": {"num_bytes": 1125985964, "checksum": "3927d5751765bbcb44f8a11d2bbcde1f54bd777c1bd873f06c5a03e80a96aa0c"}}, "download_size": 1125985964, "post_processing_size": null, "dataset_size": 3184968051, "size_in_bytes": 4310954015}, "en-ha": {"description": "Parallel corpora from Web Crawls collected in the ParaCrawl project\n40 languages, 41 bitexts\ntotal number of files: 20,995\ntotal number of tokens: 21.40G\ntotal number of sentence fragments: 1.12G\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J{\"o}rg 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/ParaCrawl.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["en", "ha"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_para_crawl", "config_name": "en-ha", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 4618460, "num_examples": 19694, "dataset_name": "opus_para_crawl"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-ParaCrawl/v7.1/moses/en-ha.txt.zip": {"num_bytes": 1757433, "checksum": "2ef7047aabaabe923921aa1eba461baae418cd6400a6696bb547686fb0918142"}}, "download_size": 1757433, "post_processing_size": null, "dataset_size": 4618460, "size_in_bytes": 6375893}, "en-ig": {"description": "Parallel corpora from Web Crawls collected in the ParaCrawl project\n40 languages, 41 bitexts\ntotal number of files: 20,995\ntotal number of tokens: 21.40G\ntotal number of sentence fragments: 1.12G\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J{\"o}rg 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/ParaCrawl.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["en", "ig"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_para_crawl", "config_name": "en-ig", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 6709030, "num_examples": 28829, "dataset_name": "opus_para_crawl"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-ParaCrawl/v7.1/moses/en-ig.txt.zip": {"num_bytes": 2691716, "checksum": "2c89f94d0b27055e6dfa4d0ff5af5ff5163b7ae2e17ba16e8ae96f7a34a14253"}}, "download_size": 2691716, "post_processing_size": null, "dataset_size": 6709030, "size_in_bytes": 9400746}, "en-km": {"description": "Parallel corpora from Web Crawls collected in the ParaCrawl project\n40 languages, 41 bitexts\ntotal number of files: 20,995\ntotal number of tokens: 21.40G\ntotal number of sentence fragments: 1.12G\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J{\"o}rg 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/ParaCrawl.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["en", "km"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_para_crawl", "config_name": "en-km", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 32012179, "num_examples": 65113, "dataset_name": "opus_para_crawl"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-ParaCrawl/v7.1/moses/en-km.txt.zip": {"num_bytes": 9887301, "checksum": "14e049e7f83c1849608813082282d122226ea606a9c9dcecc30a8162a6931355"}}, "download_size": 9887301, "post_processing_size": null, "dataset_size": 32012179, "size_in_bytes": 41899480}, "en-so": {"description": "Parallel corpora from Web Crawls collected in the ParaCrawl project\n40 languages, 41 bitexts\ntotal number of files: 20,995\ntotal number of tokens: 21.40G\ntotal number of sentence fragments: 1.12G\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J{\"o}rg 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/ParaCrawl.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["en", "so"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_para_crawl", "config_name": "en-so", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 5791785, "num_examples": 14879, "dataset_name": "opus_para_crawl"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-ParaCrawl/v7.1/moses/en-so.txt.zip": {"num_bytes": 2226276, "checksum": "8567dca937ce75488fad3f97d510bf20e9f0be9875b1abf00c35be9f8ebe3fc0"}}, "download_size": 2226276, "post_processing_size": null, "dataset_size": 5791785, "size_in_bytes": 8018061}, "de-pl": {"description": "Parallel corpora from Web Crawls collected in the ParaCrawl project\n40 languages, 41 bitexts\ntotal number of files: 20,995\ntotal number of tokens: 21.40G\ntotal number of sentence fragments: 1.12G\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J{\"o}rg 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/ParaCrawl.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["de", "pl"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_para_crawl", "config_name": "de-pl", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 298703665, "num_examples": 916624, "dataset_name": "opus_para_crawl"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-ParaCrawl/v7.1/moses/de-pl.txt.zip": {"num_bytes": 106671305, "checksum": "effc9270a9c2342eab6ea183bed7aa039ec6e171db74b7f160090ec9766c7bd6"}}, "download_size": 106671305, "post_processing_size": null, "dataset_size": 298703665, "size_in_bytes": 405374970}, "fr-nl": {"description": "Parallel corpora from Web Crawls collected in the ParaCrawl project\n40 languages, 41 bitexts\ntotal number of files: 20,995\ntotal number of tokens: 21.40G\ntotal number of sentence fragments: 1.12G\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J{\"o}rg 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/ParaCrawl.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["fr", "nl"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_para_crawl", "config_name": "fr-nl", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 862497045, "num_examples": 2687619, "dataset_name": "opus_para_crawl"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-ParaCrawl/v7.1/moses/fr-nl.txt.zip": {"num_bytes": 319074202, "checksum": "f8db5feadf6d746f88983adf6587996990062c3f249c3deab390fe537efab74e"}}, "download_size": 319074202, "post_processing_size": null, "dataset_size": 862497045, "size_in_bytes": 1181571247}, "en-sw": {"description": "Parallel corpora from Web Crawls collected in the ParaCrawl project\n40 languages, 41 bitexts\ntotal number of files: 20,995\ntotal number of tokens: 21.40G\ntotal number of sentence fragments: 1.12G\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J{\"o}rg 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/ParaCrawl.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["en", "sw"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_para_crawl", "config_name": "en-sw", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 44287355, "num_examples": 132517, "dataset_name": "opus_para_crawl"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-ParaCrawl/v7.1/moses/en-sw.txt.zip": {"num_bytes": 18601243, "checksum": "7947ceb00616c35ef903d40def465b90bdfce69adaef41378c06479c9d9b4488"}}, "download_size": 18601243, "post_processing_size": null, "dataset_size": 44287355, "size_in_bytes": 62888598}, "en-tl": {"description": "Parallel corpora from Web Crawls collected in the ParaCrawl project\n40 languages, 41 bitexts\ntotal number of files: 20,995\ntotal number of tokens: 21.40G\ntotal number of sentence fragments: 1.12G\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J{\"o}rg 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/ParaCrawl.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["en", "tl"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_para_crawl", "config_name": "en-tl", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 82545777, "num_examples": 248684, "dataset_name": "opus_para_crawl"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-ParaCrawl/v7.1/moses/en-tl.txt.zip": {"num_bytes": 32908489, "checksum": "deba159af4f3fb3583f28897f170226011f84a171fe107eca485b6b8581c6871"}}, "download_size": 32908489, "post_processing_size": null, "dataset_size": 82545777, "size_in_bytes": 115454266}, "es-gl": {"description": "Parallel corpora from Web Crawls collected in the ParaCrawl project\n40 languages, 41 bitexts\ntotal number of files: 20,995\ntotal number of tokens: 21.40G\ntotal number of sentence fragments: 1.12G\n", "citation": "@InProceedings{TIEDEMANN12.463,\n author = {J{\"o}rg 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/ParaCrawl.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": "opus_para_crawl", "config_name": "es-gl", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 252619747, "num_examples": 1222862, "dataset_name": "opus_para_crawl"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-ParaCrawl/v7.1/moses/es-gl.txt.zip": {"num_bytes": 98760324, "checksum": "653763d5238c89dc420ae0396ebdc93c1dbc6dc189b8cd29d93a28b5e95ad747"}}, "download_size": 98760324, "post_processing_size": null, "dataset_size": 252619747, "size_in_bytes": 351380071}}
|
dummy/de-pl/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e78475cbc548dc243385af808634ac2a9bc53411cedc0f7c500a579d78cff79e
|
3 |
+
size 2772
|
dummy/el-en/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8fbbd4ef0cc8f025778459615a339e7dbc08056f0b2a1d2933de469f2e13cd64
|
3 |
+
size 2206
|
dummy/en-ha/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f47182d12bd80cea82c0e4bda534638db0e11939265b82ed04dc340d0ff3e1e7
|
3 |
+
size 1517
|
dummy/en-ig/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ff88c2ef1e87f3bfa585e75b0b40f81e8ec89efaeb05fbfcf559f26d3303fbf9
|
3 |
+
size 1581
|
dummy/en-km/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0308d1ef810a2e2530116f04b956ae6dcdeefc486bc3e9ba889013282d0e6514
|
3 |
+
size 1500
|
dummy/en-so/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:485d877bffba260cccd382ca8ab087f329df2f6ecf8dee0b1cd87c3598c77c64
|
3 |
+
size 1704
|
dummy/en-sw/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bf47cb62be7b02e28a3eebe3cffece924ed9a4d5d04c777c31451b303ec03443
|
3 |
+
size 1888
|
dummy/en-tl/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5c3be3435448c36586cbae8b9dcdfd2df193c5d2c473df25d2b4595c9a55795b
|
3 |
+
size 1739
|
dummy/es-gl/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:45ed1139a4853c8ef340d624320544b7ce9938411250b166a485438d70ebaef5
|
3 |
+
size 1256
|
dummy/fr-nl/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ab8e050eb886d2d687dd700fcba766d5c311a50ad24732c1d0ad12969657adbf
|
3 |
+
size 1376
|
opus_paracrawl.py
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
Parallel corpora from Web Crawls collected in the ParaCrawl project
|
24 |
+
40 languages, 41 bitexts
|
25 |
+
total number of files: 20,995
|
26 |
+
total number of tokens: 21.40G
|
27 |
+
total number of sentence fragments: 1.12G
|
28 |
+
"""
|
29 |
+
_HOMEPAGE_URL = "http://opus.nlpl.eu/ParaCrawl.php"
|
30 |
+
_CITATION = """\
|
31 |
+
@InProceedings{TIEDEMANN12.463,
|
32 |
+
author = {J{\"o}rg Tiedemann},
|
33 |
+
title = {Parallel Data, Tools and Interfaces in OPUS},
|
34 |
+
booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)},
|
35 |
+
year = {2012},
|
36 |
+
month = {may},
|
37 |
+
date = {23-25},
|
38 |
+
address = {Istanbul, Turkey},
|
39 |
+
editor = {Nicoletta Calzolari (Conference Chair) and Khalid Choukri and Thierry Declerck and Mehmet Ugur Dogan and Bente Maegaard and Joseph Mariani and Jan Odijk and Stelios Piperidis},
|
40 |
+
publisher = {European Language Resources Association (ELRA)},
|
41 |
+
isbn = {978-2-9517408-7-7},
|
42 |
+
language = {english}
|
43 |
+
}
|
44 |
+
"""
|
45 |
+
|
46 |
+
_VERSION = "1.0.0"
|
47 |
+
_BASE_NAME = "ParaCrawl.{}.{}"
|
48 |
+
_BASE_URL = "https://object.pouta.csc.fi/OPUS-ParaCrawl/v7.1/moses/{}-{}.txt.zip"
|
49 |
+
# Please note that only few pairs are shown here. You can use config to generate data for all language pairs
|
50 |
+
_LANGUAGE_PAIRS = [
|
51 |
+
("el", "en"),
|
52 |
+
("en", "ha"),
|
53 |
+
("en", "ig"),
|
54 |
+
("en", "km"),
|
55 |
+
("en", "so"),
|
56 |
+
("de", "pl"),
|
57 |
+
("fr", "nl"),
|
58 |
+
("en", "sw"),
|
59 |
+
("en", "tl"),
|
60 |
+
("es", "gl"),
|
61 |
+
]
|
62 |
+
|
63 |
+
|
64 |
+
class ParaCrawlConfig(datasets.BuilderConfig):
|
65 |
+
def __init__(self, *args, lang1=None, lang2=None, **kwargs):
|
66 |
+
super().__init__(
|
67 |
+
*args,
|
68 |
+
name=f"{lang1}-{lang2}",
|
69 |
+
**kwargs,
|
70 |
+
)
|
71 |
+
assert lang1 != lang2, "'language 1' & 'language 2' should be different from each other"
|
72 |
+
self.lang1 = lang1
|
73 |
+
self.lang2 = lang2
|
74 |
+
|
75 |
+
|
76 |
+
class OpusParaCrawl(datasets.GeneratorBasedBuilder):
|
77 |
+
BUILDER_CONFIGS = [
|
78 |
+
ParaCrawlConfig(
|
79 |
+
lang1=lang1,
|
80 |
+
lang2=lang2,
|
81 |
+
description=f"Translating {lang1} to {lang2} or vice versa",
|
82 |
+
version=datasets.Version(_VERSION),
|
83 |
+
)
|
84 |
+
for lang1, lang2 in _LANGUAGE_PAIRS
|
85 |
+
]
|
86 |
+
BUILDER_CONFIG_CLASS = ParaCrawlConfig
|
87 |
+
|
88 |
+
def _info(self):
|
89 |
+
return datasets.DatasetInfo(
|
90 |
+
description=_DESCRIPTION,
|
91 |
+
features=datasets.Features(
|
92 |
+
{
|
93 |
+
"id": datasets.Value("string"),
|
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 |
+
download_url = _BASE_URL.format(self.config.lang1, self.config.lang2)
|
104 |
+
path = dl_manager.download_and_extract(download_url)
|
105 |
+
return [
|
106 |
+
datasets.SplitGenerator(
|
107 |
+
name=datasets.Split.TRAIN,
|
108 |
+
gen_kwargs={"datapath": path},
|
109 |
+
)
|
110 |
+
]
|
111 |
+
|
112 |
+
def _generate_examples(self, datapath):
|
113 |
+
l1, l2 = self.config.lang1, self.config.lang2
|
114 |
+
folder = l1 + "-" + l2
|
115 |
+
l1_file = _BASE_NAME.format(folder, l1)
|
116 |
+
l2_file = _BASE_NAME.format(folder, l2)
|
117 |
+
l1_path = os.path.join(datapath, l1_file)
|
118 |
+
l2_path = os.path.join(datapath, l2_file)
|
119 |
+
with open(l1_path, encoding="utf-8") as f1, open(l2_path, encoding="utf-8") as f2:
|
120 |
+
for sentence_counter, (x, y) in enumerate(zip(f1, f2)):
|
121 |
+
x = x.strip()
|
122 |
+
y = y.strip()
|
123 |
+
result = (
|
124 |
+
sentence_counter,
|
125 |
+
{
|
126 |
+
"id": str(sentence_counter),
|
127 |
+
"translation": {l1: x, l2: y},
|
128 |
+
},
|
129 |
+
)
|
130 |
+
yield result
|