Datasets:
Update
Browse files- .gitattributes +4 -10
- CITATION.cff +21 -0
- ECDC.py +103 -0
- LICENSE +3 -0
- README.md +236 -1
- csv/ECDC.csv.gz +3 -0
- csv/convert_csv.py +68 -0
- csv/langs.txt +24 -0
- csv/stats_corpus.md +26 -0
- requirements.txt +1 -0
.gitattributes
CHANGED
@@ -25,13 +25,7 @@ saved_model/**/* 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
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
# Audio files - compressed
|
33 |
-
*.aac filter=lfs diff=lfs merge=lfs -text
|
34 |
-
*.flac filter=lfs diff=lfs merge=lfs -text
|
35 |
-
*.mp3 filter=lfs diff=lfs merge=lfs -text
|
36 |
-
*.ogg filter=lfs diff=lfs merge=lfs -text
|
37 |
-
*.wav 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
|
28 |
+
*.conllu filter=lfs diff=lfs merge=lfs -text
|
29 |
+
fr_gsd-ud-plus-dev.conllu filter=lfs diff=lfs merge=lfs -text
|
30 |
+
fr_gsd-ud-plus-test.conllu filter=lfs diff=lfs merge=lfs -text
|
31 |
+
fr_gsd-ud-plus-train.conllu filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
CITATION.cff
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
cff-version: 1.0.0
|
2 |
+
message: "An overview of the European Union's highly multilingual parallel corpora"
|
3 |
+
authors:
|
4 |
+
- family-names: "Steinberger"
|
5 |
+
given-names: "Ralf"
|
6 |
+
- family-names: "Mohamed"
|
7 |
+
given-names: "Ebrahim"
|
8 |
+
- family-names: "Alexandros"
|
9 |
+
given-names: "Poulis"
|
10 |
+
- family-names: "Manuel"
|
11 |
+
given-names: "Carrasco-Benitez"
|
12 |
+
- family-names: "Patrick"
|
13 |
+
given-names: "Schlüter"
|
14 |
+
- family-names: "Marek"
|
15 |
+
given-names: "Przybyszewski"
|
16 |
+
- family-names: "Signe"
|
17 |
+
given-names: "Gilbro"
|
18 |
+
title: "An overview of the European Union's highly multilingual parallel corpora"
|
19 |
+
version: 3.0.0
|
20 |
+
date-released: 2014-11-02
|
21 |
+
url: "https://dl.acm.org/doi/10.1007/s10579-014-9277-0"
|
ECDC.py
ADDED
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# coding=utf-8
|
2 |
+
# Source: https://github.com/huggingface/datasets/blob/master/templates/new_dataset_script.py
|
3 |
+
|
4 |
+
"""ECDC : European parallel translation corpus from the European Medicines Agency"""
|
5 |
+
|
6 |
+
import datasets
|
7 |
+
import pandas as pd
|
8 |
+
|
9 |
+
logger = datasets.logging.get_logger(__name__)
|
10 |
+
|
11 |
+
_CITATION = """
|
12 |
+
@article{10.1007/s10579-014-9277-0,
|
13 |
+
author = {Steinberger, Ralf and Ebrahim, Mohamed and Poulis, Alexandros and Carrasco-Benitez, Manuel and Schl\"{u}ter, Patrick and Przybyszewski, Marek and Gilbro, Signe},
|
14 |
+
title = {An Overview of the European Union's Highly Multilingual Parallel Corpora},
|
15 |
+
year = {2014},
|
16 |
+
issue_date = {December 2014},
|
17 |
+
publisher = {Springer-Verlag},
|
18 |
+
address = {Berlin, Heidelberg},
|
19 |
+
volume = {48},
|
20 |
+
number = {4},
|
21 |
+
issn = {1574-020X},
|
22 |
+
url = {https://doi.org/10.1007/s10579-014-9277-0},
|
23 |
+
doi = {10.1007/s10579-014-9277-0},
|
24 |
+
abstract = {Starting in 2006, the European Commission's Joint Research Centre and other European Union organisations have made available a number of large-scale highly-multilingual parallel language resources. In this article, we give a comparative overview of these resources and we explain the specific nature of each of them. This article provides answers to a number of question, including: What are these linguistic resources? What is the difference between them? Why were they originally created and why was the data released publicly? What can they be used for and what are the limitations of their usability? What are the text types, subject domains and languages covered? How to avoid overlapping document sets? How do they compare regarding the formatting and the translation alignment? What are their usage conditions? What other types of multilingual linguistic resources does the EU have? This article thus aims to clarify what the similarities and differences between the various resources are and what they can be used for. It will also serve as a reference publication for those resources, for which a more detailed description has been lacking so far (EAC-TM, ECDC-TM and DGT-Acquis).},
|
25 |
+
journal = {Lang. Resour. Eval.},
|
26 |
+
month = {dec},
|
27 |
+
pages = {679–707},
|
28 |
+
numpages = {29},
|
29 |
+
keywords = {DCEP, EAC-TM, EuroVoc, JRC EuroVoc Indexer JEX, Parallel corpora, DGT-TM, Eur-Lex, Highly multilingual, Linguistic resources, DGT-Acquis, European Union, ECDC-TM, JRC-Acquis, Translation memory}
|
30 |
+
}
|
31 |
+
"""
|
32 |
+
|
33 |
+
_LANGUAGE_PAIRS = ["en-sv","en-pl","en-hu","en-lt","en-sk","en-ga","en-fr","en-cs","en-el","en-it","en-lv","en-da","en-nl","en-bg","en-is","en-ro","en-no","en-pt","en-es","en-et","en-mt","en-sl","en-fi","en-de"]
|
34 |
+
|
35 |
+
_LICENSE = """
|
36 |
+
This work is licensed under <a rel="license" href="https://wt-public.emm4u.eu/Resources/ECDC-TM/2012_10_Terms-of-Use_ECDC-TM.pdf">Copyright (c) EU/ECDC, 2022</a>.
|
37 |
+
"""
|
38 |
+
|
39 |
+
_DESCRIPTION = "No description"
|
40 |
+
|
41 |
+
_URL = "https://huggingface.co/datasets/qanastek/ECDC/resolve/main/csv/ECDC.csv.gz"
|
42 |
+
|
43 |
+
_DESCRIPTION = "No description"
|
44 |
+
|
45 |
+
class ECDC(datasets.GeneratorBasedBuilder):
|
46 |
+
"""ECDC dataset."""
|
47 |
+
|
48 |
+
BUILDER_CONFIGS = [
|
49 |
+
datasets.BuilderConfig(name=name, version=datasets.Version("1.0.0"), description="The ECDC corpora") for name in _LANGUAGE_PAIRS
|
50 |
+
]
|
51 |
+
|
52 |
+
DEFAULT_CONFIG_NAME = "en-it"
|
53 |
+
|
54 |
+
def _info(self):
|
55 |
+
src, target = self.config.name.split("-")
|
56 |
+
pair = (src, target)
|
57 |
+
return datasets.DatasetInfo(
|
58 |
+
description=_DESCRIPTION,
|
59 |
+
features=datasets.Features(
|
60 |
+
{"translation": datasets.features.Translation(languages=pair)}
|
61 |
+
),
|
62 |
+
supervised_keys=(src, target),
|
63 |
+
homepage="https://github.com/qanastek/ECDC/",
|
64 |
+
citation=_CITATION,
|
65 |
+
license=_LICENSE,
|
66 |
+
)
|
67 |
+
|
68 |
+
def _split_generators(self, dl_manager):
|
69 |
+
|
70 |
+
# Download the CSV
|
71 |
+
data_dir = dl_manager.download(_URL.format(self.config.name))
|
72 |
+
|
73 |
+
return [
|
74 |
+
datasets.SplitGenerator(
|
75 |
+
name=datasets.Split.TRAIN,
|
76 |
+
gen_kwargs={
|
77 |
+
"filepath": data_dir,
|
78 |
+
"split": "train",
|
79 |
+
}
|
80 |
+
),
|
81 |
+
]
|
82 |
+
|
83 |
+
def _generate_examples(self, filepath, split):
|
84 |
+
|
85 |
+
logger.info("⏳ Generating examples from = %s", filepath)
|
86 |
+
|
87 |
+
key_ = 0
|
88 |
+
|
89 |
+
df = pd.read_csv(filepath, compression='gzip', header=0, sep=',')
|
90 |
+
|
91 |
+
for index, row in df.iterrows():
|
92 |
+
|
93 |
+
# Get langue pair
|
94 |
+
src, target = str(row['lang']).split("-")
|
95 |
+
|
96 |
+
yield key_, {
|
97 |
+
"translation": {
|
98 |
+
src: str(row['source_text']).strip(),
|
99 |
+
target: str(row['target_text']).strip(),
|
100 |
+
},
|
101 |
+
}
|
102 |
+
|
103 |
+
key_ += 1
|
LICENSE
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
Copyright (c) EU/ECDC, 2022
|
2 |
+
|
3 |
+
https://wt-public.emm4u.eu/Resources/ECDC-TM/2012_10_Terms-of-Use_ECDC-TM.pdf
|
README.md
CHANGED
@@ -1,3 +1,238 @@
|
|
1 |
---
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
annotations_creators:
|
3 |
+
- machine-generated
|
4 |
+
- expert-generated
|
5 |
+
language_creators:
|
6 |
+
- found
|
7 |
+
languages:
|
8 |
+
- en
|
9 |
+
licenses:
|
10 |
+
- Copyright (c) EU/ECDC, 2022
|
11 |
+
multilinguality:
|
12 |
+
- en-sv
|
13 |
+
- en-pl
|
14 |
+
- en-hu
|
15 |
+
- en-lt
|
16 |
+
- en-sk
|
17 |
+
- en-ga
|
18 |
+
- en-fr
|
19 |
+
- en-cs
|
20 |
+
- en-el
|
21 |
+
- en-it
|
22 |
+
- en-lv
|
23 |
+
- en-da
|
24 |
+
- en-nl
|
25 |
+
- en-bg
|
26 |
+
- en-is
|
27 |
+
- en-ro
|
28 |
+
- en-no
|
29 |
+
- en-pt
|
30 |
+
- en-es
|
31 |
+
- en-et
|
32 |
+
- en-mt
|
33 |
+
- en-sl
|
34 |
+
- en-fi
|
35 |
+
- en-de
|
36 |
+
pretty_name: ECDC
|
37 |
+
size_categories:
|
38 |
+
- 100K<n<1M
|
39 |
+
source_datasets:
|
40 |
+
- extended
|
41 |
+
task_categories:
|
42 |
+
- translation
|
43 |
+
task_ids:
|
44 |
+
- translation
|
45 |
---
|
46 |
+
|
47 |
+
# ECDC : An overview of the European Union's highly multilingual parallel corpora
|
48 |
+
|
49 |
+
## Table of Contents
|
50 |
+
- [Dataset Card for [Needs More Information]](#dataset-card-for-needs-more-information)
|
51 |
+
- [Table of Contents](#table-of-contents)
|
52 |
+
- [Dataset Description](#dataset-description)
|
53 |
+
- [Dataset Summary](#dataset-summary)
|
54 |
+
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
55 |
+
- [Languages](#languages)
|
56 |
+
- [Dataset Structure](#dataset-structure)
|
57 |
+
- [Data Instances](#data-instances)
|
58 |
+
- [Data Fields](#data-fields)
|
59 |
+
- [Data Splits](#data-splits)
|
60 |
+
- [Dataset Creation](#dataset-creation)
|
61 |
+
- [Curation Rationale](#curation-rationale)
|
62 |
+
- [Source Data](#source-data)
|
63 |
+
- [Initial Data Collection and Normalization](#initial-data-collection-and-normalization)
|
64 |
+
- [Who are the source language producers?](#who-are-the-source-language-producers)
|
65 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
66 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
67 |
+
- [Other Known Limitations](#other-known-limitations)
|
68 |
+
- [Additional Information](#additional-information)
|
69 |
+
- [Dataset Curators](#dataset-curators)
|
70 |
+
- [Licensing Information](#licensing-information)
|
71 |
+
- [No Warranty](#no-warranty)
|
72 |
+
- [Citation Information](#citation-information)
|
73 |
+
|
74 |
+
## Dataset Description
|
75 |
+
|
76 |
+
- **Homepage:** https://joint-research-centre.ec.europa.eu/language-technology-resources/ecdc-translation-memory_en#Introduction
|
77 |
+
- **Repository:** https://joint-research-centre.ec.europa.eu/language-technology-resources/ecdc-translation-memory_en#Introduction
|
78 |
+
- **Paper:** https://dl.acm.org/doi/10.1007/s10579-014-9277-0
|
79 |
+
- **Leaderboard:** [Needs More Information]
|
80 |
+
- **Point of Contact:** yanis.labrak@univ-avignon.fr
|
81 |
+
|
82 |
+
|
83 |
+
|
84 |
+
|
85 |
+
|
86 |
+
|
87 |
+
### Dataset Summary
|
88 |
+
|
89 |
+
In October 2012, the European Union (EU) agency 'European Centre for Disease Prevention and Control' (ECDC) released a translation memory (TM), i.e. a collection of sentences and their professionally produced translations, in twenty-five languages. The data gets distributed via the [web pages of the EC's Joint Research Centre (JRC)](https://joint-research-centre.ec.europa.eu/language-technology-resources/ecdc-translation-memory_en#Introduction).
|
90 |
+
|
91 |
+
### Supported Tasks and Leaderboards
|
92 |
+
|
93 |
+
`translation`: The dataset can be used to train a model for translation.
|
94 |
+
|
95 |
+
### Languages
|
96 |
+
|
97 |
+
In our case, the corpora consists of a pair of source and target sentences for all 22 different languages from the European Union (EU).
|
98 |
+
|
99 |
+
**List of languages :** `English (en)`, `Swedish (sv)`, `Polish (pl)`, `Hungarian (hu)`,`Lithuanian (lt)`, `Latvian (lv)`, `German (de)`, `Finnish (fi)`, `Slovak (sk)`,`Slovenian (sl)`, `French (fr)`, ,`Czech (cs)`,`Danish (da)`, `Italian (it)`,`Maltese (mt)`,`Dutch (nl)`,`Portuguese (pt)`,`Romanian (ro)`, `Spanish (es)`,`Estonian (et)`, `Bulgarian (bg)`,`Greek (el)`, `Irish (ga)`, `Icelandic (is)` and `Norwegian (no)`.
|
100 |
+
|
101 |
+
## Load the dataset with HuggingFace
|
102 |
+
|
103 |
+
```python
|
104 |
+
from datasets import load_dataset
|
105 |
+
dataset = load_dataset("qanastek/ECDC", "en-it", split='train', download_mode='force_redownload')
|
106 |
+
print(dataset)
|
107 |
+
print(dataset[0])
|
108 |
+
```
|
109 |
+
|
110 |
+
## Dataset Structure
|
111 |
+
|
112 |
+
### Data Instances
|
113 |
+
|
114 |
+
```plain
|
115 |
+
key,lang,source_text,target_text
|
116 |
+
doc_0,en-bg,Vaccination against hepatitis C is not yet available.,Засега няма ваксина срещу хепатит С.
|
117 |
+
doc_1355,en-bg,Varicella infection,Инфекция с варицела
|
118 |
+
doc_2349,en-bg,"If you have any questions about the processing of your e-mail and related personal data, do not hesitate to include them in your message.","Ако имате въпроси относно обработката на вашия адрес на електронна поща и свързаните лични данни, не се колебайте да ги включите в съобщението си."
|
119 |
+
doc_192,en-bg,Transmission can be reduced especially by improving hygiene in food production handling.,Предаването на инфекцията може да бъде ограничено особено чрез подобряване на хигиената при манипулациите в хранителната индустрия.
|
120 |
+
```
|
121 |
+
|
122 |
+
### Data Fields
|
123 |
+
|
124 |
+
**key** : The document identifier `String`.
|
125 |
+
|
126 |
+
**lang** : The pair of source and target language of type `String`.
|
127 |
+
|
128 |
+
**source_text** : The source text of type `String`.
|
129 |
+
|
130 |
+
**target_text** : The target text of type `String`.
|
131 |
+
|
132 |
+
### Data Splits
|
133 |
+
|
134 |
+
|lang | key |
|
135 |
+
|-----|-----|
|
136 |
+
|en-bg|2567 |
|
137 |
+
|en-cs|2562 |
|
138 |
+
|en-da|2577 |
|
139 |
+
|en-de|2560 |
|
140 |
+
|en-el|2530 |
|
141 |
+
|en-es|2564 |
|
142 |
+
|en-et|2581 |
|
143 |
+
|en-fi|2617 |
|
144 |
+
|en-fr|2561 |
|
145 |
+
|en-ga|1356 |
|
146 |
+
|en-hu|2571 |
|
147 |
+
|en-is|2511 |
|
148 |
+
|en-it|2534 |
|
149 |
+
|en-lt|2545 |
|
150 |
+
|en-lv|2542 |
|
151 |
+
|en-mt|2539 |
|
152 |
+
|en-nl|2510 |
|
153 |
+
|en-no|2537 |
|
154 |
+
|en-pl|2546 |
|
155 |
+
|en-pt|2531 |
|
156 |
+
|en-ro|2555 |
|
157 |
+
|en-sk|2525 |
|
158 |
+
|en-sl|2545 |
|
159 |
+
|en-sv|2527 |
|
160 |
+
|
161 |
+
## Dataset Creation
|
162 |
+
|
163 |
+
### Curation Rationale
|
164 |
+
|
165 |
+
For details, check the corresponding [pages](https://joint-research-centre.ec.europa.eu/language-technology-resources/ecdc-translation-memory_en#Introduction).
|
166 |
+
|
167 |
+
### Source Data
|
168 |
+
|
169 |
+
<!-- #### Initial Data Collection and Normalization
|
170 |
+
|
171 |
+
ddd -->
|
172 |
+
|
173 |
+
#### Who are the source language producers?
|
174 |
+
|
175 |
+
Every data of this corpora as been uploaded by on [JRC](https://joint-research-centre.ec.europa.eu/language-technology-resources/ecdc-translation-memory_en#Introduction).
|
176 |
+
|
177 |
+
### Personal and Sensitive Information
|
178 |
+
|
179 |
+
The corpora is free of personal or sensitive information.
|
180 |
+
|
181 |
+
## Considerations for Using the Data
|
182 |
+
|
183 |
+
### Other Known Limitations
|
184 |
+
|
185 |
+
The nature of the task introduce a variability in the quality of the target translations.
|
186 |
+
|
187 |
+
## Additional Information
|
188 |
+
|
189 |
+
### Dataset Curators
|
190 |
+
|
191 |
+
__Hugging Face ECDC__: Labrak Yanis, Dufour Richard (Not affiliated with the original corpus)
|
192 |
+
|
193 |
+
__An overview of the European Union's highly multilingual parallel corpora__: Steinberger Ralf, Mohamed Ebrahim, Alexandros Poulis, Manuel Carrasco-Benitez, Patrick Schlüter, Marek Przybyszewski & Signe Gilbro.
|
194 |
+
|
195 |
+
### Licensing Information
|
196 |
+
|
197 |
+
By downloading or using the ECDC-Translation Memory, you are bound by the [ECDC-TM usage conditions (PDF)](https://wt-public.emm4u.eu/Resources/ECDC-TM/2012_10_Terms-of-Use_ECDC-TM.pdf).
|
198 |
+
|
199 |
+
### No Warranty
|
200 |
+
|
201 |
+
Each Work is provided ‘as is’ without, to the full extent permitted by law, representations,
|
202 |
+
warranties, obligations and liabilities of any kind, either express or implied, including, but
|
203 |
+
not limited to, any implied warranty of merchantability, integration, satisfactory quality and
|
204 |
+
fitness for a particular purpose.
|
205 |
+
|
206 |
+
Except in the cases of wilful misconduct or damages directly caused to natural persons, the
|
207 |
+
Owner will not be liable for any incidental, consequential, direct or indirect damages,
|
208 |
+
including, but not limited to, the loss of data, lost profits or any other financial loss arising
|
209 |
+
from the use of, or inability to use, the Work even if the Owner has been notified of the
|
210 |
+
possibility of such loss, damages, claims or costs, or for any claim by any third party. The
|
211 |
+
Owner may be liable under national statutory product liability laws as far as such laws apply
|
212 |
+
to the Work.
|
213 |
+
|
214 |
+
### Citation Information
|
215 |
+
|
216 |
+
Please cite the following paper when using this dataset.
|
217 |
+
|
218 |
+
```latex
|
219 |
+
@article{10.1007/s10579-014-9277-0,
|
220 |
+
author = {Steinberger, Ralf and Ebrahim, Mohamed and Poulis, Alexandros and Carrasco-Benitez, Manuel and Schl\"{u}ter, Patrick and Przybyszewski, Marek and Gilbro, Signe},
|
221 |
+
title = {An Overview of the European Union's Highly Multilingual Parallel Corpora},
|
222 |
+
year = {2014},
|
223 |
+
issue_date = {December 2014},
|
224 |
+
publisher = {Springer-Verlag},
|
225 |
+
address = {Berlin, Heidelberg},
|
226 |
+
volume = {48},
|
227 |
+
number = {4},
|
228 |
+
issn = {1574-020X},
|
229 |
+
url = {https://doi.org/10.1007/s10579-014-9277-0},
|
230 |
+
doi = {10.1007/s10579-014-9277-0},
|
231 |
+
abstract = {Starting in 2006, the European Commission's Joint Research Centre and other European Union organisations have made available a number of large-scale highly-multilingual parallel language resources. In this article, we give a comparative overview of these resources and we explain the specific nature of each of them. This article provides answers to a number of question, including: What are these linguistic resources? What is the difference between them? Why were they originally created and why was the data released publicly? What can they be used for and what are the limitations of their usability? What are the text types, subject domains and languages covered? How to avoid overlapping document sets? How do they compare regarding the formatting and the translation alignment? What are their usage conditions? What other types of multilingual linguistic resources does the EU have? This article thus aims to clarify what the similarities and differences between the various resources are and what they can be used for. It will also serve as a reference publication for those resources, for which a more detailed description has been lacking so far (EAC-TM, ECDC-TM and DGT-Acquis).},
|
232 |
+
journal = {Lang. Resour. Eval.},
|
233 |
+
month = {dec},
|
234 |
+
pages = {679–707},
|
235 |
+
numpages = {29},
|
236 |
+
keywords = {DCEP, EAC-TM, EuroVoc, JRC EuroVoc Indexer JEX, Parallel corpora, DGT-TM, Eur-Lex, Highly multilingual, Linguistic resources, DGT-Acquis, European Union, ECDC-TM, JRC-Acquis, Translation memory}
|
237 |
+
}
|
238 |
+
```
|
csv/ECDC.csv.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:654e1873c819593c58d91525aae6e50833fc8609f5bf597c4ff145a8e4862adf
|
3 |
+
size 4987096
|
csv/convert_csv.py
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import re
|
2 |
+
import pandas as pd
|
3 |
+
from tqdm import tqdm
|
4 |
+
from bs4 import BeautifulSoup
|
5 |
+
|
6 |
+
# https://wt-public.emm4u.eu/Resources/ECDC-TM/2012_10_Terms-of-Use_ECDC-TM.pdf
|
7 |
+
|
8 |
+
INPUT_TMX = "ECDC.tmx"
|
9 |
+
|
10 |
+
print("⌛ Load TMX...")
|
11 |
+
|
12 |
+
tree = BeautifulSoup(open(INPUT_TMX,"r"), features="lxml")
|
13 |
+
|
14 |
+
print("⚗️ Parse content")
|
15 |
+
sentences = []
|
16 |
+
for tu in tqdm(tree.findAll("tu")):
|
17 |
+
langs = {}
|
18 |
+
for tuv in tu.findAll("tuv"):
|
19 |
+
text = re.sub("\s+", " ", tuv.seg.text.replace("\n"," "))
|
20 |
+
langs[tuv["xml:lang"].lower()] = text
|
21 |
+
sentences.append(langs)
|
22 |
+
|
23 |
+
content = []
|
24 |
+
|
25 |
+
print("⚙️ Convert to CSV")
|
26 |
+
# For each sentences
|
27 |
+
for idx, sentence in tqdm(enumerate(sentences)):
|
28 |
+
|
29 |
+
# For each language
|
30 |
+
for lang in sentence:
|
31 |
+
|
32 |
+
# Pass english
|
33 |
+
if lang == "en":
|
34 |
+
continue
|
35 |
+
|
36 |
+
# Add row
|
37 |
+
content.append({
|
38 |
+
'key': "doc_" + str(idx),
|
39 |
+
'lang': "en-" + lang,
|
40 |
+
'source_text': sentence["en"],
|
41 |
+
'target_text': sentence[lang]
|
42 |
+
})
|
43 |
+
|
44 |
+
df = pd.DataFrame({
|
45 |
+
'key': [],
|
46 |
+
'lang': [],
|
47 |
+
'source_text': [],
|
48 |
+
'target_text': []
|
49 |
+
})
|
50 |
+
df = df.append(content)
|
51 |
+
|
52 |
+
# Sort by language pair
|
53 |
+
df = df.sort_values(by=['lang'], ascending=True)
|
54 |
+
|
55 |
+
print("💾 Save as CSV and GZ")
|
56 |
+
df.to_csv("ECDC.csv", index=False)
|
57 |
+
df.to_csv("ECDC.csv.gz", index=False, compression="gzip")
|
58 |
+
|
59 |
+
uniq_elements = list(set(df['lang'].unique()))
|
60 |
+
l = open("langs.txt","w")
|
61 |
+
l.write("\n".join(uniq_elements))
|
62 |
+
l.close()
|
63 |
+
|
64 |
+
|
65 |
+
uniq_elements = df.groupby('lang').count()
|
66 |
+
l = open("stats.md","w")
|
67 |
+
l.write(str(uniq_elements))
|
68 |
+
l.close()
|
csv/langs.txt
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
en-de
|
2 |
+
en-sl
|
3 |
+
en-sk
|
4 |
+
en-ro
|
5 |
+
en-hu
|
6 |
+
en-es
|
7 |
+
en-fr
|
8 |
+
en-cs
|
9 |
+
en-it
|
10 |
+
en-is
|
11 |
+
en-el
|
12 |
+
en-pt
|
13 |
+
en-sv
|
14 |
+
en-mt
|
15 |
+
en-fi
|
16 |
+
en-lv
|
17 |
+
en-ga
|
18 |
+
en-bg
|
19 |
+
en-nl
|
20 |
+
en-pl
|
21 |
+
en-da
|
22 |
+
en-et
|
23 |
+
en-lt
|
24 |
+
en-no
|
csv/stats_corpus.md
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|lang | key |
|
2 |
+
|-----|-----|
|
3 |
+
|en-bg|2567 |
|
4 |
+
|en-cs|2562 |
|
5 |
+
|en-da|2577 |
|
6 |
+
|en-de|2560 |
|
7 |
+
|en-el|2530 |
|
8 |
+
|en-es|2564 |
|
9 |
+
|en-et|2581 |
|
10 |
+
|en-fi|2617 |
|
11 |
+
|en-fr|2561 |
|
12 |
+
|en-ga|1356 |
|
13 |
+
|en-hu|2571 |
|
14 |
+
|en-is|2511 |
|
15 |
+
|en-it|2534 |
|
16 |
+
|en-lt|2545 |
|
17 |
+
|en-lv|2542 |
|
18 |
+
|en-mt|2539 |
|
19 |
+
|en-nl|2510 |
|
20 |
+
|en-no|2537 |
|
21 |
+
|en-pl|2546 |
|
22 |
+
|en-pt|2531 |
|
23 |
+
|en-ro|2555 |
|
24 |
+
|en-sk|2525 |
|
25 |
+
|en-sl|2545 |
|
26 |
+
|en-sv|2527 |
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
translate-toolkit
|