Datasets:
Commit
•
8807c95
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 +154 -0
- dataset_infos.json +1 -0
- dummy/es-eu/1.0.0/dummy_data.zip +3 -0
- eitb_parcc.py +105 -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,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- found
|
4 |
+
language_creators:
|
5 |
+
- found
|
6 |
+
languages:
|
7 |
+
- es
|
8 |
+
- eu
|
9 |
+
licenses:
|
10 |
+
- unknown
|
11 |
+
multilinguality:
|
12 |
+
- multilingual
|
13 |
+
size_categories:
|
14 |
+
- 100K<n<1M
|
15 |
+
source_datasets:
|
16 |
+
- original
|
17 |
+
task_categories:
|
18 |
+
- conditional-text-generation
|
19 |
+
task_ids:
|
20 |
+
- machine-translation
|
21 |
+
---
|
22 |
+
|
23 |
+
# Dataset Card for [Dataset Name]
|
24 |
+
|
25 |
+
## Table of Contents
|
26 |
+
- [Dataset Description](#dataset-description)
|
27 |
+
- [Dataset Summary](#dataset-summary)
|
28 |
+
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
29 |
+
- [Languages](#languages)
|
30 |
+
- [Dataset Structure](#dataset-structure)
|
31 |
+
- [Data Instances](#data-instances)
|
32 |
+
- [Data Fields](#data-instances)
|
33 |
+
- [Data Splits](#data-instances)
|
34 |
+
- [Dataset Creation](#dataset-creation)
|
35 |
+
- [Curation Rationale](#curation-rationale)
|
36 |
+
- [Source Data](#source-data)
|
37 |
+
- [Annotations](#annotations)
|
38 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
39 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
40 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
41 |
+
- [Discussion of Biases](#discussion-of-biases)
|
42 |
+
- [Other Known Limitations](#other-known-limitations)
|
43 |
+
- [Additional Information](#additional-information)
|
44 |
+
- [Dataset Curators](#dataset-curators)
|
45 |
+
- [Licensing Information](#licensing-information)
|
46 |
+
- [Citation Information](#citation-information)
|
47 |
+
|
48 |
+
## Dataset Description
|
49 |
+
|
50 |
+
- **Homepage:**[EiTB-ParCC: Parallel Corpus of Comparable New](http://opus.nlpl.eu/EiTB-ParCC.php)
|
51 |
+
- **Repository:**
|
52 |
+
- **Paper:**
|
53 |
+
- **Leaderboard:**
|
54 |
+
- **Point of Contact:**
|
55 |
+
|
56 |
+
### Dataset Summary
|
57 |
+
|
58 |
+
EiTB-ParCC: Parallel Corpus of Comparable News. A Basque-Spanish parallel corpus provided by \
|
59 |
+
Vicomtech (https://www.vicomtech.org), extracted from comparable news produced by the \
|
60 |
+
Basque public broadcasting group Euskal Irrati Telebista.
|
61 |
+
|
62 |
+
### Supported Tasks and Leaderboards
|
63 |
+
|
64 |
+
The underlying task is machine translation.
|
65 |
+
|
66 |
+
### Languages
|
67 |
+
|
68 |
+
[More Information Needed]
|
69 |
+
|
70 |
+
## Dataset Structure
|
71 |
+
|
72 |
+
### Data Instances
|
73 |
+
|
74 |
+
[More Information Needed]
|
75 |
+
|
76 |
+
### Data Fields
|
77 |
+
|
78 |
+
[More Information Needed]
|
79 |
+
|
80 |
+
### Data Splits
|
81 |
+
|
82 |
+
[More Information Needed]
|
83 |
+
|
84 |
+
## Dataset Creation
|
85 |
+
|
86 |
+
### Curation Rationale
|
87 |
+
|
88 |
+
[More Information Needed]
|
89 |
+
|
90 |
+
### Source Data
|
91 |
+
|
92 |
+
#### Initial Data Collection and Normalization
|
93 |
+
|
94 |
+
[More Information Needed]
|
95 |
+
|
96 |
+
#### Who are the source language producers?
|
97 |
+
|
98 |
+
[More Information Needed]
|
99 |
+
|
100 |
+
### Annotations
|
101 |
+
|
102 |
+
#### Annotation process
|
103 |
+
|
104 |
+
[More Information Needed]
|
105 |
+
|
106 |
+
#### Who are the annotators?
|
107 |
+
|
108 |
+
[More Information Needed]
|
109 |
+
|
110 |
+
### Personal and Sensitive Information
|
111 |
+
|
112 |
+
[More Information Needed]
|
113 |
+
|
114 |
+
## Considerations for Using the Data
|
115 |
+
|
116 |
+
### Social Impact of Dataset
|
117 |
+
|
118 |
+
[More Information Needed]
|
119 |
+
|
120 |
+
### Discussion of Biases
|
121 |
+
|
122 |
+
[More Information Needed]
|
123 |
+
|
124 |
+
### Other Known Limitations
|
125 |
+
|
126 |
+
[More Information Needed]
|
127 |
+
|
128 |
+
## Additional Information
|
129 |
+
|
130 |
+
### Dataset Curators
|
131 |
+
|
132 |
+
[More Information Needed]
|
133 |
+
|
134 |
+
### Licensing Information
|
135 |
+
|
136 |
+
[More Information Needed]
|
137 |
+
|
138 |
+
### Citation Information
|
139 |
+
|
140 |
+
```
|
141 |
+
@InProceedings{TIEDEMANN12.463,
|
142 |
+
author = {J{\"o}rg Tiedemann},
|
143 |
+
title = {Parallel Data, Tools and Interfaces in OPUS},
|
144 |
+
booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)},
|
145 |
+
year = {2012},
|
146 |
+
month = {may},
|
147 |
+
date = {23-25},
|
148 |
+
address = {Istanbul, Turkey},
|
149 |
+
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},
|
150 |
+
publisher = {European Language Resources Association (ELRA)},
|
151 |
+
isbn = {978-2-9517408-7-7},
|
152 |
+
language = {english}
|
153 |
+
}
|
154 |
+
```
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"es-eu": {"description": "EiTB-ParCC: Parallel Corpus of Comparable News. A Basque-Spanish parallel corpus provided by Vicomtech (https://www.vicomtech.org), extracted from comparable news produced by the Basque public broadcasting group Euskal Irrati Telebista.\n", "citation": "J. Tiedemann, 2012, Parallel Data, Tools and Interfaces in OPUS. In Proceedings of the 8th International Conference on Language Resources and Evaluation (LREC 2012)\n", "homepage": "http://opus.nlpl.eu/EiTB-ParCC.php", "license": "", "features": {"translation": {"languages": ["es", "eu"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "eitb_parcc", "config_name": "es-eu", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 139039398, "num_examples": 637183, "dataset_name": "eitb_parcc"}}, "download_checksums": {"http://opus.nlpl.eu/download.php?f=EiTB-ParCC/v1/moses/es-eu.txt.zip": {"num_bytes": 57244346, "checksum": "c58139e779d1d7f4f44bd67640f43db6c85d24d74ec01c7c062ea4c842447140"}}, "download_size": 57244346, "post_processing_size": null, "dataset_size": 139039398, "size_in_bytes": 196283744}}
|
dummy/es-eu/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:03953f4009c86856e73dfacd979ea365f6ec972199be97c6da9bcfb0a9568670
|
3 |
+
size 1140
|
eitb_parcc.py
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# coding=utf-8
|
2 |
+
# Copyright 2020 The 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 |
+
"""EiTB-ParCC: Parallel Corpus of Comparable News"""
|
16 |
+
|
17 |
+
from __future__ import absolute_import, division, print_function
|
18 |
+
|
19 |
+
import os
|
20 |
+
|
21 |
+
import datasets
|
22 |
+
|
23 |
+
|
24 |
+
_CITATION = """\
|
25 |
+
@InProceedings{TIEDEMANN12.463,
|
26 |
+
author = {J{\"o}rg Tiedemann},
|
27 |
+
title = {Parallel Data, Tools and Interfaces in OPUS},
|
28 |
+
booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)},
|
29 |
+
year = {2012},
|
30 |
+
month = {may},
|
31 |
+
date = {23-25},
|
32 |
+
address = {Istanbul, Turkey},
|
33 |
+
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},
|
34 |
+
publisher = {European Language Resources Association (ELRA)},
|
35 |
+
isbn = {978-2-9517408-7-7},
|
36 |
+
language = {english}
|
37 |
+
}
|
38 |
+
"""
|
39 |
+
|
40 |
+
|
41 |
+
_DESCRIPTION = """\
|
42 |
+
EiTB-ParCC: Parallel Corpus of Comparable News. A Basque-Spanish parallel corpus provided by \
|
43 |
+
Vicomtech (https://www.vicomtech.org), extracted from comparable news produced by the \
|
44 |
+
Basque public broadcasting group Euskal Irrati Telebista.
|
45 |
+
"""
|
46 |
+
|
47 |
+
|
48 |
+
_HOMEPAGE = "http://opus.nlpl.eu/EiTB-ParCC.php"
|
49 |
+
|
50 |
+
_URL = "http://opus.nlpl.eu/download.php?f=EiTB-ParCC/v1/moses/es-eu.txt.zip"
|
51 |
+
|
52 |
+
|
53 |
+
class EitbParcc(datasets.GeneratorBasedBuilder):
|
54 |
+
"""EiTB-ParCC: Parallel Corpus of Comparable News"""
|
55 |
+
|
56 |
+
VERSION = datasets.Version("1.0.0")
|
57 |
+
|
58 |
+
BUILDER_CONFIGS = [
|
59 |
+
datasets.BuilderConfig(
|
60 |
+
name="es-eu", version=datasets.Version("1.0.0"), description="A Basque-Spanish parallel"
|
61 |
+
)
|
62 |
+
]
|
63 |
+
|
64 |
+
def _info(self):
|
65 |
+
return datasets.DatasetInfo(
|
66 |
+
description=_DESCRIPTION,
|
67 |
+
features=datasets.Features(
|
68 |
+
{"translation": datasets.features.Translation(languages=tuple(self.config.name.split("-")))}
|
69 |
+
),
|
70 |
+
supervised_keys=None,
|
71 |
+
homepage=_HOMEPAGE,
|
72 |
+
citation=_CITATION,
|
73 |
+
)
|
74 |
+
|
75 |
+
def _split_generators(self, dl_manager):
|
76 |
+
"""Returns SplitGenerators."""
|
77 |
+
lang_pair = self.config.name.split("-")
|
78 |
+
data_dir = dl_manager.download_and_extract(_URL)
|
79 |
+
return [
|
80 |
+
datasets.SplitGenerator(
|
81 |
+
name=datasets.Split.TRAIN,
|
82 |
+
gen_kwargs={
|
83 |
+
"source_file": os.path.join(data_dir, f"EiTB-ParCC.{self.config.name}.{lang_pair[0]}"),
|
84 |
+
"target_file": os.path.join(data_dir, f"EiTB-ParCC.{self.config.name}.{lang_pair[1]}"),
|
85 |
+
},
|
86 |
+
),
|
87 |
+
]
|
88 |
+
|
89 |
+
def _generate_examples(self, source_file, target_file):
|
90 |
+
with open(source_file, encoding="utf-8") as f:
|
91 |
+
source_sentences = f.read().split("\n")
|
92 |
+
with open(target_file, encoding="utf-8") as f:
|
93 |
+
target_sentences = f.read().split("\n")
|
94 |
+
|
95 |
+
assert len(target_sentences) == len(source_sentences), "Sizes do not match: %d vs %d for %s vs %s." % (
|
96 |
+
len(source_sentences),
|
97 |
+
len(target_sentences),
|
98 |
+
source_file,
|
99 |
+
target_file,
|
100 |
+
)
|
101 |
+
|
102 |
+
source, target = tuple(self.config.name.split("-"))
|
103 |
+
for idx, (l1, l2) in enumerate(zip(source_sentences, target_sentences)):
|
104 |
+
result = {"translation": {source: l1, target: l2}}
|
105 |
+
yield idx, result
|