Commit ·
47bbdcd
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
Files changed (9)
- .gitattributesAdded+27
- README.mdAdded+164
- dataset_infos.jsonAdded+1
- dummy/cs-en/1.0.0/dummy_data.zipAdded+3
- dummy/de-fr/1.0.0/dummy_data.zipAdded+3
- dummy/el-it/1.0.0/dummy_data.zipAdded+3
- dummy/en-nl/1.0.0/dummy_data.zipAdded+3
- dummy/fi-pl/1.0.0/dummy_data.zipAdded+3
- ecb.pyAdded+128
123456789101112131415161718192021222324252627*.7z filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.bin.* filter=lfs diff=lfs merge=lfs -text*.bz2 filter=lfs diff=lfs merge=lfs -text*.ftz filter=lfs diff=lfs merge=lfs -text*.gz filter=lfs diff=lfs merge=lfs -text*.h5 filter=lfs diff=lfs merge=lfs -text*.joblib filter=lfs diff=lfs merge=lfs -text*.lfs.* filter=lfs diff=lfs merge=lfs -text*.model filter=lfs diff=lfs merge=lfs -text*.msgpack filter=lfs diff=lfs merge=lfs -text*.onnx filter=lfs diff=lfs merge=lfs -text*.ot filter=lfs diff=lfs merge=lfs -text*.parquet filter=lfs diff=lfs merge=lfs -text*.pb filter=lfs diff=lfs merge=lfs -text*.pt filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.rar filter=lfs diff=lfs merge=lfs -textsaved_model/**/* filter=lfs diff=lfs merge=lfs -text*.tar.* filter=lfs diff=lfs merge=lfs -text*.tflite filter=lfs diff=lfs merge=lfs -text*.tgz filter=lfs diff=lfs merge=lfs -text*.xz filter=lfs diff=lfs merge=lfs -text*.zip filter=lfs diff=lfs merge=lfs -text*.zstandard filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164---annotations_creators:- foundlanguage_creators:- foundlanguages:- cs- da- de- el- en- es- et- fi- fr- hu- it- lt- lv- mt- nl- pl- pt- sk- sllicenses:- unknownmultilinguality:- multilingualsize_categories:- 100K<n<1Msource_datasets:- originaltask_categories:- conditional-text-generationtask_ids:- machine-translation---
# Dataset Card Creation Guide
## Table of Contents- [Dataset Description](#dataset-description) - [Dataset Summary](#dataset-summary) - [Supported Tasks](#supported-tasks-and-leaderboards) - [Languages](#languages)- [Dataset Structure](#dataset-structure) - [Data Instances](#data-instances) - [Data Fields](#data-instances) - [Data Splits](#data-instances)- [Dataset Creation](#dataset-creation) - [Curation Rationale](#curation-rationale) - [Source Data](#source-data) - [Annotations](#annotations) - [Personal and Sensitive Information](#personal-and-sensitive-information)- [Considerations for Using the Data](#considerations-for-using-the-data) - [Social Impact of Dataset](#social-impact-of-dataset) - [Discussion of Biases](#discussion-of-biases) - [Other Known Limitations](#other-known-limitations)- [Additional Information](#additional-information) - [Dataset Curators](#dataset-curators) - [Licensing Information](#licensing-information) - [Citation Information](#citation-information)
## Dataset Description
- **Homepage:** http://opus.nlpl.eu/ECB.php- **Repository:** None- **Paper:** http://www.lrec-conf.org/proceedings/lrec2012/pdf/463_Paper.pdf- **Leaderboard:** [More Information Needed]- **Point of Contact:** [More Information Needed]
### Dataset Summary
To load a language pair which isn't part of the config, all you need to do is specify the language code as pairs.You can find the valid pairs in Homepage section of Dataset Description: http://opus.nlpl.eu/ECB.phpE.g.
`dataset = load_dataset("ecb", lang1="en", lang2="fi")`
### Supported Tasks and Leaderboards
[More Information Needed]
### Languages
[More Information Needed]
## Dataset Structure
### Data Instances
Here are some examples of questions and facts:
### Data Fields
[More Information Needed]
### Data Splits
[More Information Needed]
## Dataset Creation
### Curation Rationale
[More Information Needed]
### Source Data
[More Information Needed]
#### Initial Data Collection and Normalization
[More Information Needed]
#### Who are the source language producers?
[More Information Needed]
### Annotations
[More Information Needed]
#### Annotation process
[More Information Needed]
#### Who are the annotators?
[More Information Needed]
### Personal and Sensitive Information
[More Information Needed]
## Considerations for Using the Data
### Social Impact of Dataset
[More Information Needed]
### Discussion of Biases
[More Information Needed]
### Other Known Limitations
[More Information Needed]
## Additional Information
### Dataset Curators
[More Information Needed]
### Licensing Information
[More Information Needed]
### Citation Information
[More Information Needed]1{"de-fr": {"description": "Original source: Website and documentatuion from the European Central Bank, compiled and made available by Alberto Simoes (thank you very much!)\n19 languages, 170 bitexts\ntotal number of files: 340\ntotal number of tokens: 757.37M\ntotal number of sentence fragments: 30.55M\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": "", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["de", "fr"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "ecb", "config_name": "de-fr", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 39514115, "num_examples": 105116, "dataset_name": "ecb"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-ECB/v1/moses/de-fr.txt.zip": {"num_bytes": 10326178, "checksum": "99812e3c814fac41c749eaed07351cbde4e80bccfed4411a37400196e0054682"}}, "download_size": 10326178, "post_processing_size": null, "dataset_size": 39514115, "size_in_bytes": 49840293}, "cs-en": {"description": "Original source: Website and documentatuion from the European Central Bank, compiled and made available by Alberto Simoes (thank you very much!)\n19 languages, 170 bitexts\ntotal number of files: 340\ntotal number of tokens: 757.37M\ntotal number of sentence fragments: 30.55M\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": "", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["cs", "en"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "ecb", "config_name": "cs-en", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 19524831, "num_examples": 63716, "dataset_name": "ecb"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-ECB/v1/moses/cs-en.txt.zip": {"num_bytes": 5360485, "checksum": "88951c38f54ab407646acde8489176036176438bfbd0ca45477278dfc5fb0424"}}, "download_size": 5360485, "post_processing_size": null, "dataset_size": 19524831, "size_in_bytes": 24885316}, "el-it": {"description": "Original source: Website and documentatuion from the European Central Bank, compiled and made available by Alberto Simoes (thank you very much!)\n19 languages, 170 bitexts\ntotal number of files: 340\ntotal number of tokens: 757.37M\ntotal number of sentence fragments: 30.55M\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": "", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["el", "it"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "ecb", "config_name": "el-it", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 47300471, "num_examples": 94712, "dataset_name": "ecb"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-ECB/v1/moses/el-it.txt.zip": {"num_bytes": 10394277, "checksum": "859a831ce48aa2334f65deafa46a57ef5c1972181370cddddfed006f769f331f"}}, "download_size": 10394277, "post_processing_size": null, "dataset_size": 47300471, "size_in_bytes": 57694748}, "en-nl": {"description": "Original source: Website and documentatuion from the European Central Bank, compiled and made available by Alberto Simoes (thank you very much!)\n19 languages, 170 bitexts\ntotal number of files: 340\ntotal number of tokens: 757.37M\ntotal number of sentence fragments: 30.55M\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": "", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["en", "nl"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "ecb", "config_name": "en-nl", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 43118164, "num_examples": 126482, "dataset_name": "ecb"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-ECB/v1/moses/en-nl.txt.zip": {"num_bytes": 11360895, "checksum": "fd3565cce4a51ffd24fae324c5f23d5465cdf60494b0ce0f91cefc838818e91b"}}, "download_size": 11360895, "post_processing_size": null, "dataset_size": 43118164, "size_in_bytes": 54479059}, "fi-pl": {"description": "Original source: Website and documentatuion from the European Central Bank, compiled and made available by Alberto Simoes (thank you very much!)\n19 languages, 170 bitexts\ntotal number of files: 340\ntotal number of tokens: 757.37M\ntotal number of sentence fragments: 30.55M\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": "", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["fi", "pl"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "ecb", "config_name": "fi-pl", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 12973283, "num_examples": 41686, "dataset_name": "ecb"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-ECB/v1/moses/fi-pl.txt.zip": {"num_bytes": 3521950, "checksum": "1e14311230608f1eba068f243163cd52b266aa97e2e0e3a6373faaac70c6389f"}}, "download_size": 3521950, "post_processing_size": null, "dataset_size": 12973283, "size_in_bytes": 16495233}}123version https://git-lfs.github.com/spec/v1oid sha256:83608f5e40e234f5b363b6700c34c8cc1cc422ec58d51da3d0db591c33b916cfsize 976123version https://git-lfs.github.com/spec/v1oid sha256:a4cf6871052c3021d1b28f11c59f5d9e71ac4409b8e680142ad61d32e1f3b789size 1040123version https://git-lfs.github.com/spec/v1oid sha256:2b639fc8e61fdf42da9a13eae59cf38170dc5101cb3f8a39b0d994e83a31b274size 1458123version https://git-lfs.github.com/spec/v1oid sha256:2cce5ea6abfe9c4d3b097c973eace31dbfa68477e0ada5c23bd0d667ad1299bcsize 1546123version https://git-lfs.github.com/spec/v1oid sha256:49764a668d01a0f6b051c3b4af63a5401a40bd51a1c318d29b0ab3c4d40a4204size 1102123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128# coding=utf-8# Copyright 2020 HuggingFace Datasets Authors.## Licensed under the Apache License, Version 2.0 (the "License");# you may not use this file except in compliance with the License.# You may obtain a copy of the License at## http://www.apache.org/licenses/LICENSE-2.0## Unless required by applicable law or agreed to in writing, software# distributed under the License is distributed on an "AS IS" BASIS,# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License.
# Lint as: python3import os
import datasets
_DESCRIPTION = """\Original source: Website and documentatuion from the European Central Bank, compiled and made available by Alberto Simoes (thank you very much!)19 languages, 170 bitextstotal number of files: 340total number of tokens: 757.37Mtotal number of sentence fragments: 30.55M"""_HOMEPAGE_URL = ""_CITATION = """\@InProceedings{TIEDEMANN12.463, author = {J�rg Tiedemann}, title = {Parallel Data, Tools and Interfaces in OPUS}, booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)}, year = {2012}, month = {may}, date = {23-25}, address = {Istanbul, Turkey}, 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}, publisher = {European Language Resources Association (ELRA)}, isbn = {978-2-9517408-7-7}, language = {english} }"""
_VERSION = "1.0.0"_BASE_NAME = "ECB.{}.{}"_BASE_URL = "https://object.pouta.csc.fi/OPUS-ECB/v1/moses/{}-{}.txt.zip"
# Please note that only few pairs are shown here. You can use config to generate data for all language pairs_LANGUAGE_PAIRS = [ ("de", "fr"), ("cs", "en"), ("el", "it"), ("en", "nl"), ("fi", "pl"),]
class EcbConfig(datasets.BuilderConfig): def __init__(self, *args, lang1=None, lang2=None, **kwargs): super().__init__( *args, name=f"{lang1}-{lang2}", **kwargs, ) self.lang1 = lang1 self.lang2 = lang2
class Ecb(datasets.GeneratorBasedBuilder): BUILDER_CONFIGS = [ EcbConfig( lang1=lang1, lang2=lang2, description=f"Translating {lang1} to {lang2} or vice versa", version=datasets.Version(_VERSION), ) for lang1, lang2 in _LANGUAGE_PAIRS ] BUILDER_CONFIG_CLASS = EcbConfig
def _info(self): return datasets.DatasetInfo( description=_DESCRIPTION, features=datasets.Features( { "id": datasets.Value("string"), "translation": datasets.Translation(languages=(self.config.lang1, self.config.lang2)), }, ), supervised_keys=None, homepage=_HOMEPAGE_URL, citation=_CITATION, )
def _split_generators(self, dl_manager): def _base_url(lang1, lang2): return _BASE_URL.format(lang1, lang2)
download_url = _base_url(self.config.lang1, self.config.lang2) path = dl_manager.download_and_extract(download_url) return [ datasets.SplitGenerator( name=datasets.Split.TRAIN, gen_kwargs={"datapath": path}, ) ]
def _generate_examples(self, datapath): l1, l2 = self.config.lang1, self.config.lang2 folder = l1 + "-" + l2 l1_file = _BASE_NAME.format(folder, l1) l2_file = _BASE_NAME.format(folder, l2) l1_path = os.path.join(datapath, l1_file) l2_path = os.path.join(datapath, l2_file) with open(l1_path, encoding="utf-8") as f1, open(l2_path, encoding="utf-8") as f2: for sentence_counter, (x, y) in enumerate(zip(f1, f2)): x = x.strip() y = y.strip() result = ( sentence_counter, { "id": str(sentence_counter), "translation": {l1: x, l2: y}, }, ) yield result.gitattributesAdded+27
README.mdAdded+164
dataset_infos.jsonAdded+1
dummy/cs-en/1.0.0/dummy_data.zipAdded+3
dummy/de-fr/1.0.0/dummy_data.zipAdded+3
dummy/el-it/1.0.0/dummy_data.zipAdded+3
dummy/en-nl/1.0.0/dummy_data.zipAdded+3
dummy/fi-pl/1.0.0/dummy_data.zipAdded+3
ecb.pyAdded+128