Datasets:
Commit
·
bfe505c
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 +138 -0
- dataset_infos.json +1 -0
- dummy/es-eu/1.0.0/dummy_data.zip +3 -0
- opus_elhuyar.py +97 -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,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
annotations_creators:
|
| 3 |
+
- found
|
| 4 |
+
language_creators:
|
| 5 |
+
- found
|
| 6 |
+
languages:
|
| 7 |
+
- es
|
| 8 |
+
- eu
|
| 9 |
+
licenses:
|
| 10 |
+
- unknown
|
| 11 |
+
multilinguality:
|
| 12 |
+
- translation
|
| 13 |
+
size_categories:
|
| 14 |
+
- 1k<10K
|
| 15 |
+
source_datasets:
|
| 16 |
+
- original
|
| 17 |
+
task_categories:
|
| 18 |
+
- conditional-text-generation
|
| 19 |
+
task_ids:
|
| 20 |
+
- machine-translation
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
# Dataset Card for [opus_elhuyar]
|
| 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:**[Opus Elhuyar](http://opus.nlpl.eu/Elhuyar.php)
|
| 51 |
+
- **Repository:**
|
| 52 |
+
- **Paper:**
|
| 53 |
+
- **Leaderboard:**
|
| 54 |
+
- **Point of Contact:**
|
| 55 |
+
|
| 56 |
+
### Dataset Summary
|
| 57 |
+
|
| 58 |
+
Dataset provided by the foundation Elhuyar (http://webcorpusak.elhuyar.eus/sarrera_paraleloa.html) and submitted to OPUS by Joseba Garcia Beaumont
|
| 59 |
+
|
| 60 |
+
### Supported Tasks and Leaderboards
|
| 61 |
+
|
| 62 |
+
The underlying task is machine translation from Spanish to Basque
|
| 63 |
+
|
| 64 |
+
### Languages
|
| 65 |
+
|
| 66 |
+
Spanish to Basque
|
| 67 |
+
|
| 68 |
+
## Dataset Structure
|
| 69 |
+
|
| 70 |
+
### Data Instances
|
| 71 |
+
|
| 72 |
+
[More Information Needed]
|
| 73 |
+
|
| 74 |
+
### Data Fields
|
| 75 |
+
|
| 76 |
+
[More Information Needed]
|
| 77 |
+
|
| 78 |
+
### Data Splits
|
| 79 |
+
|
| 80 |
+
[More Information Needed]
|
| 81 |
+
|
| 82 |
+
## Dataset Creation
|
| 83 |
+
|
| 84 |
+
### Curation Rationale
|
| 85 |
+
|
| 86 |
+
[More Information Needed]
|
| 87 |
+
|
| 88 |
+
### Source Data
|
| 89 |
+
|
| 90 |
+
#### Initial Data Collection and Normalization
|
| 91 |
+
|
| 92 |
+
[More Information Needed]
|
| 93 |
+
|
| 94 |
+
#### Who are the source language producers?
|
| 95 |
+
|
| 96 |
+
[More Information Needed]
|
| 97 |
+
|
| 98 |
+
### Annotations
|
| 99 |
+
|
| 100 |
+
#### Annotation process
|
| 101 |
+
|
| 102 |
+
[More Information Needed]
|
| 103 |
+
|
| 104 |
+
#### Who are the annotators?
|
| 105 |
+
|
| 106 |
+
[More Information Needed]
|
| 107 |
+
|
| 108 |
+
### Personal and Sensitive Information
|
| 109 |
+
|
| 110 |
+
[More Information Needed]
|
| 111 |
+
|
| 112 |
+
## Considerations for Using the Data
|
| 113 |
+
|
| 114 |
+
### Social Impact of Dataset
|
| 115 |
+
|
| 116 |
+
[More Information Needed]
|
| 117 |
+
|
| 118 |
+
### Discussion of Biases
|
| 119 |
+
|
| 120 |
+
[More Information Needed]
|
| 121 |
+
|
| 122 |
+
### Other Known Limitations
|
| 123 |
+
|
| 124 |
+
[More Information Needed]
|
| 125 |
+
|
| 126 |
+
## Additional Information
|
| 127 |
+
|
| 128 |
+
### Dataset Curators
|
| 129 |
+
|
| 130 |
+
[More Information Needed]
|
| 131 |
+
|
| 132 |
+
### Licensing Information
|
| 133 |
+
|
| 134 |
+
[More Information Needed]
|
| 135 |
+
|
| 136 |
+
### Citation Information
|
| 137 |
+
|
| 138 |
+
J. Tiedemann, 2012, Parallel Data, Tools and Interfaces in OPUS. In Proceedings of the 8th International Conference on Language Resources and Evaluation (LREC 2012)
|
dataset_infos.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"es-eu": {"description": "Dataset provided by the foundation Elhuyar, which is having data in languages Spanish to Basque.\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)", "homepage": "http://opus.nlpl.eu/Elhuyar.php", "license": "", "features": {"translation": {"languages": ["es", "eu"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_elhuyar", "config_name": "es-eu", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 127833939, "num_examples": 642348, "dataset_name": "opus_elhuyar"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-Elhuyar/v1/moses/es-eu.txt.zip": {"num_bytes": 44468751, "checksum": "629407a326c6615c2d574a9f631ef689035e6d55a9345fcf1be0f3e74c03eaca"}}, "download_size": 44468751, "post_processing_size": null, "dataset_size": 127833939, "size_in_bytes": 172302690}}
|
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:509a0c705ff0b6aa0702dc45b84dec79e2bfc31a83e3468b5d930b271b4deccd
|
| 3 |
+
size 821
|
opus_elhuyar.py
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# coding=utf-8
|
| 2 |
+
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
|
| 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 |
+
"""Opus elhuyar : Spanish - Basque """
|
| 16 |
+
|
| 17 |
+
from __future__ import absolute_import, division, print_function
|
| 18 |
+
|
| 19 |
+
import os
|
| 20 |
+
|
| 21 |
+
import datasets
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
_CITATION = """\
|
| 25 |
+
@InProceedings{opus:Elhuyar,
|
| 26 |
+
title = {Parallel Data, Tools and Interfaces in OPUS. In Proceedings of the 8th International \
|
| 27 |
+
Conference on Language Resources and Evaluation (LREC 2012)},
|
| 28 |
+
authors={J. Tiedemann},
|
| 29 |
+
year={2012}
|
| 30 |
+
}"""
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
_DESCRIPTION = """\
|
| 34 |
+
Dataset provided by the foundation Elhuyar, which is having data in languages Spanish to Basque.
|
| 35 |
+
"""
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
_HOMEPAGE = "http://opus.nlpl.eu/Elhuyar.php"
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
_LICENSE = ""
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
_URLs = {"train": "https://object.pouta.csc.fi/OPUS-Elhuyar/v1/moses/es-eu.txt.zip"}
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
class OpusElhuyar(datasets.GeneratorBasedBuilder):
|
| 48 |
+
"""TODO: Short description of my dataset."""
|
| 49 |
+
|
| 50 |
+
VERSION = datasets.Version("1.0.0")
|
| 51 |
+
|
| 52 |
+
BUILDER_CONFIGS = [datasets.BuilderConfig(name="es-eu", version=VERSION)]
|
| 53 |
+
|
| 54 |
+
def _info(self):
|
| 55 |
+
return datasets.DatasetInfo(
|
| 56 |
+
description=_DESCRIPTION,
|
| 57 |
+
features=datasets.Features(
|
| 58 |
+
{"translation": datasets.features.Translation(languages=tuple(self.config.name.split("-")))}
|
| 59 |
+
),
|
| 60 |
+
supervised_keys=None,
|
| 61 |
+
homepage="http://opus.nlpl.eu/Elhuyar.php",
|
| 62 |
+
citation=_CITATION,
|
| 63 |
+
)
|
| 64 |
+
|
| 65 |
+
def _split_generators(self, dl_manager):
|
| 66 |
+
"""Returns SplitGenerators."""
|
| 67 |
+
data_dir = dl_manager.download_and_extract(_URLs)
|
| 68 |
+
return [
|
| 69 |
+
datasets.SplitGenerator(
|
| 70 |
+
name=datasets.Split.TRAIN,
|
| 71 |
+
# These kwargs will be passed to _generate_examples
|
| 72 |
+
gen_kwargs={
|
| 73 |
+
"source_file": os.path.join(data_dir["train"], "Elhuyar.es-eu.es"),
|
| 74 |
+
"target_file": os.path.join(data_dir["train"], "Elhuyar.es-eu.eu"),
|
| 75 |
+
"split": "train",
|
| 76 |
+
},
|
| 77 |
+
),
|
| 78 |
+
]
|
| 79 |
+
|
| 80 |
+
def _generate_examples(self, source_file, target_file, split):
|
| 81 |
+
"""This function returns the examples in the raw (text) form."""
|
| 82 |
+
with open(source_file, encoding="utf-8") as f:
|
| 83 |
+
source_sentences = f.read().split("\n")
|
| 84 |
+
with open(target_file, encoding="utf-8") as f:
|
| 85 |
+
target_sentences = f.read().split("\n")
|
| 86 |
+
|
| 87 |
+
assert len(target_sentences) == len(source_sentences), "Sizes do not match: %d vs %d for %s vs %s." % (
|
| 88 |
+
len(source_sentences),
|
| 89 |
+
len(target_sentences),
|
| 90 |
+
source_file,
|
| 91 |
+
target_file,
|
| 92 |
+
)
|
| 93 |
+
|
| 94 |
+
source, target = tuple(self.config.name.split("-"))
|
| 95 |
+
for idx, (l1, l2) in enumerate(zip(source_sentences, target_sentences)):
|
| 96 |
+
result = {"translation": {source: l1, target: l2}}
|
| 97 |
+
yield idx, result
|