Commit ·
5a9e732
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 (5)
- .gitattributesAdded+27
- README.mdAdded+142
- dataset_infos.jsonAdded+1
- dummy/en-sv/1.0.0/dummy_data.zipAdded+3
- wiki_source.pyAdded+121
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 -text123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142---annotations_creators:- foundlanguage_creators:- foundlanguages:- en- svlicenses:- unknownmultilinguality:- multilingualsize_categories:- 10K<n<100Ksource_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/WikiSource.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
[More Information Needed]
### Supported Tasks and Leaderboards
[More Information Needed]
### Languages
[More Information Needed]
## Dataset Structure
### Data Instances
[More Information Needed]
### 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{"en-sv": {"description": "2 languages, total number of files: 132\ntotal number of tokens: 1.80M\ntotal number of sentence fragments: 78.36k\n", "citation": "Tiedemann, J., 2012, Parallel Data, Tools and Interfaces in OPUS. In Proceedings of the 8th International Conference on Language Resources and Evaluation (LREC 2012) and\nTyers, F. M. (2009) \"Rule-based augmentation of training data in Breton-French statistical machine translation \". Proceedings of the 13th Annual Conference of the European Association of Machine Translation, EAMT09. pp. 213--218\n", "homepage": "http://opus.nlpl.eu/WikiSource.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["en", "sv"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "wiki_source", "config_name": "en-sv", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 8153542, "num_examples": 33283, "dataset_name": "wiki_source"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-WikiSource/v1/moses/en-sv.txt.zip": {"num_bytes": 2375052, "checksum": "6f516e638c0db55df63e0dbe342342f9c950a7bf64f55e89675e7b5b6223c03a"}}, "download_size": 2375052, "post_processing_size": null, "dataset_size": 8153542, "size_in_bytes": 10528594}}123version https://git-lfs.github.com/spec/v1oid sha256:52f2b81b4b1581b6b1a732907e432e15b2ae5f9514d97594f358aeaa2c6ce869size 1143123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121# 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 = """\2 languages, total number of files: 132total number of tokens: 1.80Mtotal number of sentence fragments: 78.36k"""_HOMEPAGE_URL = "http://opus.nlpl.eu/WikiSource.php"_CITATION = """\@InProceedings{TIEDEMANN12.463, author = {J{\"o}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 = "WikiSource.{}.{}"_BASE_URL = "https://object.pouta.csc.fi/OPUS-WikiSource/v1/moses/{}-{}.txt.zip"
_LANGUAGE_PAIRS = [ ("en", "sv"),]
class WikiSourceConfig(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 WikiSource(datasets.GeneratorBasedBuilder): BUILDER_CONFIGS = [ WikiSourceConfig( 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 = WikiSourceConfig
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+142
dataset_infos.jsonAdded+1
dummy/en-sv/1.0.0/dummy_data.zipAdded+3
wiki_source.pyAdded+121