Datasets:
Commit
•
9b0ff4d
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 +183 -0
- dataset_infos.json +1 -0
- dummy/bg-ga/1.0.0/dummy_data.zip +3 -0
- dummy/bg-hr/1.0.0/dummy_data.zip +3 -0
- dummy/bg-sh/1.0.0/dummy_data.zip +3 -0
- dummy/es-ga/1.0.0/dummy_data.zip +3 -0
- dummy/fi-ga/1.0.0/dummy_data.zip +3 -0
- dummy/ga-nl/1.0.0/dummy_data.zip +3 -0
- dummy/ga-sh/1.0.0/dummy_data.zip +3 -0
- dummy/hr-sk/1.0.0/dummy_data.zip +3 -0
- dummy/hr-sv/1.0.0/dummy_data.zip +3 -0
- dummy/mt-sh/1.0.0/dummy_data.zip +3 -0
- opus_dgt.py +132 -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,183 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- found
|
4 |
+
language_creators:
|
5 |
+
- found
|
6 |
+
languages:
|
7 |
+
- bg
|
8 |
+
- cs
|
9 |
+
- da
|
10 |
+
- de
|
11 |
+
- el
|
12 |
+
- en
|
13 |
+
- es
|
14 |
+
- et
|
15 |
+
- fi
|
16 |
+
- fr
|
17 |
+
- ga
|
18 |
+
- hr
|
19 |
+
- hu
|
20 |
+
- it
|
21 |
+
- lt
|
22 |
+
- lv
|
23 |
+
- mt
|
24 |
+
- nl
|
25 |
+
- pl
|
26 |
+
- pt
|
27 |
+
- ro
|
28 |
+
- sh
|
29 |
+
- sk
|
30 |
+
- sl
|
31 |
+
- sv
|
32 |
+
licenses:
|
33 |
+
- unknown
|
34 |
+
multilinguality:
|
35 |
+
- multilingual
|
36 |
+
size_categories:
|
37 |
+
- 10K<n<100K
|
38 |
+
source_datasets:
|
39 |
+
- original
|
40 |
+
task_categories:
|
41 |
+
- conditional-text-generation
|
42 |
+
task_ids:
|
43 |
+
- machine-translation
|
44 |
+
---
|
45 |
+
|
46 |
+
# Dataset Card Creation Guide
|
47 |
+
|
48 |
+
## Table of Contents
|
49 |
+
- [Dataset Description](#dataset-description)
|
50 |
+
- [Dataset Summary](#dataset-summary)
|
51 |
+
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
52 |
+
- [Languages](#languages)
|
53 |
+
- [Dataset Structure](#dataset-structure)
|
54 |
+
- [Data Instances](#data-instances)
|
55 |
+
- [Data Fields](#data-instances)
|
56 |
+
- [Data Splits](#data-instances)
|
57 |
+
- [Dataset Creation](#dataset-creation)
|
58 |
+
- [Curation Rationale](#curation-rationale)
|
59 |
+
- [Source Data](#source-data)
|
60 |
+
- [Annotations](#annotations)
|
61 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
62 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
63 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
64 |
+
- [Discussion of Biases](#discussion-of-biases)
|
65 |
+
- [Other Known Limitations](#other-known-limitations)
|
66 |
+
- [Additional Information](#additional-information)
|
67 |
+
- [Dataset Curators](#dataset-curators)
|
68 |
+
- [Licensing Information](#licensing-information)
|
69 |
+
- [Citation Information](#citation-information)
|
70 |
+
|
71 |
+
## Dataset Description
|
72 |
+
|
73 |
+
- **Homepage:** http://opus.nlpl.eu/DGT.php
|
74 |
+
- **Repository:** None
|
75 |
+
- **Paper:** http://www.lrec-conf.org/proceedings/lrec2012/pdf/463_Paper.pdf
|
76 |
+
- **Leaderboard:** [More Information Needed]
|
77 |
+
- **Point of Contact:** [More Information Needed]
|
78 |
+
|
79 |
+
### Dataset Summary
|
80 |
+
|
81 |
+
|
82 |
+
To load a language pair which isn't part of the config, all you need to do is specify the language code as pairs.
|
83 |
+
You can find the valid pairs in Homepage section of Dataset Description: http://opus.nlpl.eu/DGT.php
|
84 |
+
E.g.
|
85 |
+
|
86 |
+
`dataset = load_dataset("dgt", lang1="it", lang2="pl")`
|
87 |
+
|
88 |
+
|
89 |
+
### Supported Tasks and Leaderboards
|
90 |
+
|
91 |
+
[More Information Needed]
|
92 |
+
|
93 |
+
### Languages
|
94 |
+
|
95 |
+
[More Information Needed]
|
96 |
+
|
97 |
+
## Dataset Structure
|
98 |
+
|
99 |
+
### Data Instances
|
100 |
+
|
101 |
+
[More Information Needed]
|
102 |
+
|
103 |
+
### Data Fields
|
104 |
+
|
105 |
+
[More Information Needed]
|
106 |
+
|
107 |
+
### Data Splits
|
108 |
+
|
109 |
+
[More Information Needed]
|
110 |
+
|
111 |
+
## Dataset Creation
|
112 |
+
|
113 |
+
### Curation Rationale
|
114 |
+
|
115 |
+
[More Information Needed]
|
116 |
+
|
117 |
+
### Source Data
|
118 |
+
|
119 |
+
[More Information Needed]
|
120 |
+
|
121 |
+
#### Initial Data Collection and Normalization
|
122 |
+
|
123 |
+
[More Information Needed]
|
124 |
+
|
125 |
+
#### Who are the source language producers?
|
126 |
+
|
127 |
+
[More Information Needed]
|
128 |
+
|
129 |
+
### Annotations
|
130 |
+
|
131 |
+
[More Information Needed]
|
132 |
+
|
133 |
+
#### Annotation process
|
134 |
+
|
135 |
+
[More Information Needed]
|
136 |
+
|
137 |
+
#### Who are the annotators?
|
138 |
+
|
139 |
+
[More Information Needed]
|
140 |
+
|
141 |
+
### Personal and Sensitive Information
|
142 |
+
|
143 |
+
[More Information Needed]
|
144 |
+
|
145 |
+
## Considerations for Using the Data
|
146 |
+
|
147 |
+
### Social Impact of Dataset
|
148 |
+
|
149 |
+
[More Information Needed]
|
150 |
+
|
151 |
+
### Discussion of Biases
|
152 |
+
|
153 |
+
[More Information Needed]
|
154 |
+
|
155 |
+
### Other Known Limitations
|
156 |
+
|
157 |
+
[More Information Needed]
|
158 |
+
|
159 |
+
## Additional Information
|
160 |
+
|
161 |
+
### Dataset Curators
|
162 |
+
|
163 |
+
[More Information Needed]
|
164 |
+
|
165 |
+
### Licensing Information
|
166 |
+
|
167 |
+
[More Information Needed]
|
168 |
+
|
169 |
+
### Citation Information
|
170 |
+
|
171 |
+
@InProceedings{TIEDEMANN12.463,
|
172 |
+
author = {J{\"o}rg Tiedemann},
|
173 |
+
title = {Parallel Data, Tools and Interfaces in OPUS},
|
174 |
+
booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)},
|
175 |
+
year = {2012},
|
176 |
+
month = {may},
|
177 |
+
date = {23-25},
|
178 |
+
address = {Istanbul, Turkey},
|
179 |
+
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},
|
180 |
+
publisher = {European Language Resources Association (ELRA)},
|
181 |
+
isbn = {978-2-9517408-7-7},
|
182 |
+
language = {english}
|
183 |
+
}
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"bg-ga": {"description": "A collection of translation memories provided by the JRC. Source: https://ec.europa.eu/jrc/en/language-technologies/dgt-translation-memory\n25 languages, 299 bitexts\ntotal number of files: 817,410\ntotal number of tokens: 2.13G\ntotal number of sentence fragments: 113.52M\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/DGT.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["bg", "ga"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_dgt", "config_name": "bg-ga", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 82972428, "num_examples": 179142, "dataset_name": "opus_dgt"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-DGT/v2019/moses/bg-ga.txt.zip": {"num_bytes": 15935979, "checksum": "8bf637b0cbafc4c28a01f3f0796e87e5e70d2a021d248dae745bd54045164cc4"}}, "download_size": 15935979, "post_processing_size": null, "dataset_size": 82972428, "size_in_bytes": 98908407}, "bg-hr": {"description": "A collection of translation memories provided by the JRC. Source: https://ec.europa.eu/jrc/en/language-technologies/dgt-translation-memory\n25 languages, 299 bitexts\ntotal number of files: 817,410\ntotal number of tokens: 2.13G\ntotal number of sentence fragments: 113.52M\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/DGT.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["bg", "hr"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_dgt", "config_name": "bg-hr", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 239828651, "num_examples": 701572, "dataset_name": "opus_dgt"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-DGT/v2019/moses/bg-hr.txt.zip": {"num_bytes": 46804111, "checksum": "194e2043472a7dcf5a2d1ff8703a46368e77a7c10b9768075d5a0bc9ad21f439"}}, "download_size": 46804111, "post_processing_size": null, "dataset_size": 239828651, "size_in_bytes": 286632762}, "bg-sh": {"description": "A collection of translation memories provided by the JRC. Source: https://ec.europa.eu/jrc/en/language-technologies/dgt-translation-memory\n25 languages, 299 bitexts\ntotal number of files: 817,410\ntotal number of tokens: 2.13G\ntotal number of sentence fragments: 113.52M\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/DGT.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["bg", "sh"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_dgt", "config_name": "bg-sh", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 498884905, "num_examples": 1488507, "dataset_name": "opus_dgt"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-DGT/v2019/moses/bg-sh.txt.zip": {"num_bytes": 97402723, "checksum": "5a5917680f918834c06462345a1e6571e4efbb2b2e62ae125a08a46794c21d52"}}, "download_size": 97402723, "post_processing_size": null, "dataset_size": 498884905, "size_in_bytes": 596287628}, "fi-ga": {"description": "A collection of translation memories provided by the JRC. Source: https://ec.europa.eu/jrc/en/language-technologies/dgt-translation-memory\n25 languages, 299 bitexts\ntotal number of files: 817,410\ntotal number of tokens: 2.13G\ntotal number of sentence fragments: 113.52M\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/DGT.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["fi", "ga"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_dgt", "config_name": "fi-ga", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 61313136, "num_examples": 178619, "dataset_name": "opus_dgt"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-DGT/v2019/moses/fi-ga.txt.zip": {"num_bytes": 14385114, "checksum": "487b57580a4bb72311238e5a8e3b86ee7c9e5be549eb4e6d9f977e92fcfaca9a"}}, "download_size": 14385114, "post_processing_size": null, "dataset_size": 61313136, "size_in_bytes": 75698250}, "es-ga": {"description": "A collection of translation memories provided by the JRC. Source: https://ec.europa.eu/jrc/en/language-technologies/dgt-translation-memory\n25 languages, 299 bitexts\ntotal number of files: 817,410\ntotal number of tokens: 2.13G\ntotal number of sentence fragments: 113.52M\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/DGT.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["es", "ga"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_dgt", "config_name": "es-ga", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 63115666, "num_examples": 178696, "dataset_name": "opus_dgt"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-DGT/v2019/moses/es-ga.txt.zip": {"num_bytes": 14447359, "checksum": "c7fa6b780c92b6cbc4bc68ce96e5ff4ebfa027c60e0c446e962e27b027ef824a"}}, "download_size": 14447359, "post_processing_size": null, "dataset_size": 63115666, "size_in_bytes": 77563025}, "ga-sh": {"description": "A collection of translation memories provided by the JRC. Source: https://ec.europa.eu/jrc/en/language-technologies/dgt-translation-memory\n25 languages, 299 bitexts\ntotal number of files: 817,410\ntotal number of tokens: 2.13G\ntotal number of sentence fragments: 113.52M\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/DGT.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["ga", "sh"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_dgt", "config_name": "ga-sh", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 28666585, "num_examples": 91613, "dataset_name": "opus_dgt"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-DGT/v2019/moses/ga-sh.txt.zip": {"num_bytes": 6963357, "checksum": "ea3ebba6a5c3a1b4f689727b2c84782158c2604cf47107c3e2df3565a6a2163d"}}, "download_size": 6963357, "post_processing_size": null, "dataset_size": 28666585, "size_in_bytes": 35629942}, "hr-sk": {"description": "A collection of translation memories provided by the JRC. Source: https://ec.europa.eu/jrc/en/language-technologies/dgt-translation-memory\n25 languages, 299 bitexts\ntotal number of files: 817,410\ntotal number of tokens: 2.13G\ntotal number of sentence fragments: 113.52M\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/DGT.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["hr", "sk"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_dgt", "config_name": "hr-sk", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 170718371, "num_examples": 689263, "dataset_name": "opus_dgt"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-DGT/v2019/moses/hr-sk.txt.zip": {"num_bytes": 42579941, "checksum": "ab25092d1cc7698f7730718a9a4cc4317642696a7b6f1c454118d9e04683503f"}}, "download_size": 42579941, "post_processing_size": null, "dataset_size": 170718371, "size_in_bytes": 213298312}, "mt-sh": {"description": "A collection of translation memories provided by the JRC. Source: https://ec.europa.eu/jrc/en/language-technologies/dgt-translation-memory\n25 languages, 299 bitexts\ntotal number of files: 817,410\ntotal number of tokens: 2.13G\ntotal number of sentence fragments: 113.52M\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/DGT.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["mt", "sh"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_dgt", "config_name": "mt-sh", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 368562443, "num_examples": 1450424, "dataset_name": "opus_dgt"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-DGT/v2019/moses/mt-sh.txt.zip": {"num_bytes": 88598048, "checksum": "d557d6256f3c4f1852a8e586fbcbe4a8ad55d92f1bcb3bd102486f7ed3e11797"}}, "download_size": 88598048, "post_processing_size": null, "dataset_size": 368562443, "size_in_bytes": 457160491}, "hr-sv": {"description": "A collection of translation memories provided by the JRC. Source: https://ec.europa.eu/jrc/en/language-technologies/dgt-translation-memory\n25 languages, 299 bitexts\ntotal number of files: 817,410\ntotal number of tokens: 2.13G\ntotal number of sentence fragments: 113.52M\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/DGT.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["hr", "sv"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_dgt", "config_name": "hr-sv", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 171858392, "num_examples": 696334, "dataset_name": "opus_dgt"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-DGT/v2019/moses/hr-sv.txt.zip": {"num_bytes": 41410203, "checksum": "c75787dedd033a0fd9098dcd1e403e0c53eaa9706f2f3c770a9855135e4cf6c8"}}, "download_size": 41410203, "post_processing_size": null, "dataset_size": 171858392, "size_in_bytes": 213268595}, "ga-nl": {"description": "A collection of translation memories provided by the JRC. Source: https://ec.europa.eu/jrc/en/language-technologies/dgt-translation-memory\n25 languages, 299 bitexts\ntotal number of files: 817,410\ntotal number of tokens: 2.13G\ntotal number of sentence fragments: 113.52M\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/DGT.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["ga", "nl"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_dgt", "config_name": "ga-nl", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 59065574, "num_examples": 170644, "dataset_name": "opus_dgt"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-DGT/v2019/moses/ga-nl.txt.zip": {"num_bytes": 13730934, "checksum": "71d997981ea48b550d451f1728a9fe78ed8866290c20af80113146ff51a6f017"}}, "download_size": 13730934, "post_processing_size": null, "dataset_size": 59065574, "size_in_bytes": 72796508}}
|
dummy/bg-ga/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:55d49852118a45486928ddb4eaff673293981a2d3bacb4ccdb1735d16fef2478
|
3 |
+
size 1709
|
dummy/bg-hr/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7fb32fac3deddcb66e34f1ff08388260dd35c0b4e1e4184907be61d4de37b152
|
3 |
+
size 1388
|
dummy/bg-sh/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7d46721fc7da6b627e58eb5a1094efc22014665913eb6d192f8bee2668fef1fb
|
3 |
+
size 1755
|
dummy/es-ga/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6962d8dabb0ea444a0434c1cf83b285666d1606a7cf089303be62f72d13ba193
|
3 |
+
size 1712
|
dummy/fi-ga/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5a8b2d11b132f4d1294a762d29a2d35d14059020790371a33e1e5d749a9a56f2
|
3 |
+
size 1589
|
dummy/ga-nl/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:21b515f64dbbfffae229c6576fa6060fd64b3257a79992c3b1a5e3e0cb435ce1
|
3 |
+
size 1604
|
dummy/ga-sh/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:deacb92d7e46f98e4ee430b2a9f976110957f321fd896b364d685433f2b2dca8
|
3 |
+
size 1381
|
dummy/hr-sk/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c5df5fa74e7b779bcdd9f82ff3df309479bf3a814d7bb3cc0b9c186e23c49599
|
3 |
+
size 1152
|
dummy/hr-sv/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:39c2e2852c9c6ba28a0c9d311af1b5203af41e730d982219f815e1422eb4694e
|
3 |
+
size 1316
|
dummy/mt-sh/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:247a246a48fc6b934a44704602cc98a47084bdaceaa0a6a428313e40398a9962
|
3 |
+
size 1651
|
opus_dgt.py
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# coding=utf-8
|
2 |
+
# Copyright 2020 HuggingFace Datasets Authors.
|
3 |
+
#
|
4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5 |
+
# you may not use this file except in compliance with the License.
|
6 |
+
# You may obtain a copy of the License at
|
7 |
+
#
|
8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9 |
+
#
|
10 |
+
# Unless required by applicable law or agreed to in writing, software
|
11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
+
# See the License for the specific language governing permissions and
|
14 |
+
# limitations under the License.
|
15 |
+
|
16 |
+
# Lint as: python3
|
17 |
+
import os
|
18 |
+
|
19 |
+
import datasets
|
20 |
+
|
21 |
+
|
22 |
+
_DESCRIPTION = """\
|
23 |
+
A collection of translation memories provided by the JRC. Source: https://ec.europa.eu/jrc/en/language-technologies/dgt-translation-memory
|
24 |
+
25 languages, 299 bitexts
|
25 |
+
total number of files: 817,410
|
26 |
+
total number of tokens: 2.13G
|
27 |
+
total number of sentence fragments: 113.52M
|
28 |
+
"""
|
29 |
+
_HOMEPAGE_URL = "http://opus.nlpl.eu/DGT.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 = "DGT.{}.{}"
|
48 |
+
_BASE_URL = "https://object.pouta.csc.fi/OPUS-DGT/v2019/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 |
+
("bg", "ga"),
|
52 |
+
("bg", "hr"),
|
53 |
+
("bg", "sh"),
|
54 |
+
("fi", "ga"),
|
55 |
+
("es", "ga"),
|
56 |
+
("ga", "sh"),
|
57 |
+
("hr", "sk"),
|
58 |
+
("mt", "sh"),
|
59 |
+
("hr", "sv"),
|
60 |
+
("ga", "nl"),
|
61 |
+
]
|
62 |
+
|
63 |
+
|
64 |
+
class DgtConfig(datasets.BuilderConfig):
|
65 |
+
def __init__(self, *args, lang1=None, lang2=None, **kwargs):
|
66 |
+
super().__init__(
|
67 |
+
*args,
|
68 |
+
name=f"{lang1}-{lang2}",
|
69 |
+
**kwargs,
|
70 |
+
)
|
71 |
+
self.lang1 = lang1
|
72 |
+
self.lang2 = lang2
|
73 |
+
|
74 |
+
|
75 |
+
class OpusDgt(datasets.GeneratorBasedBuilder):
|
76 |
+
BUILDER_CONFIGS = [
|
77 |
+
DgtConfig(
|
78 |
+
lang1=lang1,
|
79 |
+
lang2=lang2,
|
80 |
+
description=f"Translating {lang1} to {lang2} or vice versa",
|
81 |
+
version=datasets.Version(_VERSION),
|
82 |
+
)
|
83 |
+
for lang1, lang2 in _LANGUAGE_PAIRS
|
84 |
+
]
|
85 |
+
BUILDER_CONFIG_CLASS = DgtConfig
|
86 |
+
|
87 |
+
def _info(self):
|
88 |
+
return datasets.DatasetInfo(
|
89 |
+
description=_DESCRIPTION,
|
90 |
+
features=datasets.Features(
|
91 |
+
{
|
92 |
+
"id": datasets.Value("string"),
|
93 |
+
"translation": datasets.Translation(languages=(self.config.lang1, self.config.lang2)),
|
94 |
+
},
|
95 |
+
),
|
96 |
+
supervised_keys=None,
|
97 |
+
homepage=_HOMEPAGE_URL,
|
98 |
+
citation=_CITATION,
|
99 |
+
)
|
100 |
+
|
101 |
+
def _split_generators(self, dl_manager):
|
102 |
+
def _base_url(lang1, lang2):
|
103 |
+
return _BASE_URL.format(lang1, lang2)
|
104 |
+
|
105 |
+
download_url = _base_url(self.config.lang1, self.config.lang2)
|
106 |
+
path = dl_manager.download_and_extract(download_url)
|
107 |
+
return [
|
108 |
+
datasets.SplitGenerator(
|
109 |
+
name=datasets.Split.TRAIN,
|
110 |
+
gen_kwargs={"datapath": path},
|
111 |
+
)
|
112 |
+
]
|
113 |
+
|
114 |
+
def _generate_examples(self, datapath):
|
115 |
+
l1, l2 = self.config.lang1, self.config.lang2
|
116 |
+
folder = l1 + "-" + l2
|
117 |
+
l1_file = _BASE_NAME.format(folder, l1)
|
118 |
+
l2_file = _BASE_NAME.format(folder, l2)
|
119 |
+
l1_path = os.path.join(datapath, l1_file)
|
120 |
+
l2_path = os.path.join(datapath, l2_file)
|
121 |
+
with open(l1_path, encoding="utf-8") as f1, open(l2_path, encoding="utf-8") as f2:
|
122 |
+
for sentence_counter, (x, y) in enumerate(zip(f1, f2)):
|
123 |
+
x = x.strip()
|
124 |
+
y = y.strip()
|
125 |
+
result = (
|
126 |
+
sentence_counter,
|
127 |
+
{
|
128 |
+
"id": str(sentence_counter),
|
129 |
+
"translation": {l1: x, l2: y},
|
130 |
+
},
|
131 |
+
)
|
132 |
+
yield result
|