Datasets:

Multilinguality:
multilingual
Size Categories:
10K<n<100K
Language Creators:
found
Annotations Creators:
found
Source Datasets:
original
Tags:
License:
system HF staff commited on
Commit
5a9e732
0 Parent(s):

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.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,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - found
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - en
8
+ - sv
9
+ licenses:
10
+ - unknown
11
+ multilinguality:
12
+ - multilingual
13
+ size_categories:
14
+ - 10K<n<100K
15
+ source_datasets:
16
+ - original
17
+ task_categories:
18
+ - conditional-text-generation
19
+ task_ids:
20
+ - machine-translation
21
+ ---
22
+
23
+ # Dataset Card Creation Guide
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:** http://opus.nlpl.eu/WikiSource.php
51
+ - **Repository:** None
52
+ - **Paper:** http://www.lrec-conf.org/proceedings/lrec2012/pdf/463_Paper.pdf
53
+ - **Leaderboard:** [More Information Needed]
54
+ - **Point of Contact:** [More Information Needed]
55
+
56
+ ### Dataset Summary
57
+
58
+ [More Information Needed]
59
+
60
+ ### Supported Tasks and Leaderboards
61
+
62
+ [More Information Needed]
63
+
64
+ ### Languages
65
+
66
+ [More Information Needed]
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
+ [More Information Needed]
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
+ [More Information Needed]
103
+
104
+ #### Annotation process
105
+
106
+ [More Information Needed]
107
+
108
+ #### Who are the annotators?
109
+
110
+ [More Information Needed]
111
+
112
+ ### Personal and Sensitive Information
113
+
114
+ [More Information Needed]
115
+
116
+ ## Considerations for Using the Data
117
+
118
+ ### Social Impact of Dataset
119
+
120
+ [More Information Needed]
121
+
122
+ ### Discussion of Biases
123
+
124
+ [More Information Needed]
125
+
126
+ ### Other Known Limitations
127
+
128
+ [More Information Needed]
129
+
130
+ ## Additional Information
131
+
132
+ ### Dataset Curators
133
+
134
+ [More Information Needed]
135
+
136
+ ### Licensing Information
137
+
138
+ [More Information Needed]
139
+
140
+ ### Citation Information
141
+
142
+ [More Information Needed]
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
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}}
dummy/en-sv/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:52f2b81b4b1581b6b1a732907e432e15b2ae5f9514d97594f358aeaa2c6ce869
3
+ size 1143
wiki_source.py ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 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
+
16
+ # Lint as: python3
17
+ import os
18
+
19
+ import datasets
20
+
21
+
22
+ _DESCRIPTION = """\
23
+ 2 languages, total number of files: 132
24
+ total number of tokens: 1.80M
25
+ total number of sentence fragments: 78.36k
26
+ """
27
+ _HOMEPAGE_URL = "http://opus.nlpl.eu/WikiSource.php"
28
+ _CITATION = """\
29
+ @InProceedings{TIEDEMANN12.463,
30
+ author = {J{\"o}rg Tiedemann},
31
+ title = {Parallel Data, Tools and Interfaces in OPUS},
32
+ booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)},
33
+ year = {2012},
34
+ month = {may},
35
+ date = {23-25},
36
+ address = {Istanbul, Turkey},
37
+ 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},
38
+ publisher = {European Language Resources Association (ELRA)},
39
+ isbn = {978-2-9517408-7-7},
40
+ language = {english}
41
+ }
42
+ """
43
+
44
+ _VERSION = "1.0.0"
45
+ _BASE_NAME = "WikiSource.{}.{}"
46
+ _BASE_URL = "https://object.pouta.csc.fi/OPUS-WikiSource/v1/moses/{}-{}.txt.zip"
47
+
48
+ _LANGUAGE_PAIRS = [
49
+ ("en", "sv"),
50
+ ]
51
+
52
+
53
+ class WikiSourceConfig(datasets.BuilderConfig):
54
+ def __init__(self, *args, lang1=None, lang2=None, **kwargs):
55
+ super().__init__(
56
+ *args,
57
+ name=f"{lang1}-{lang2}",
58
+ **kwargs,
59
+ )
60
+ self.lang1 = lang1
61
+ self.lang2 = lang2
62
+
63
+
64
+ class WikiSource(datasets.GeneratorBasedBuilder):
65
+ BUILDER_CONFIGS = [
66
+ WikiSourceConfig(
67
+ lang1=lang1,
68
+ lang2=lang2,
69
+ description=f"Translating {lang1} to {lang2} or vice versa",
70
+ version=datasets.Version(_VERSION),
71
+ )
72
+ for lang1, lang2 in _LANGUAGE_PAIRS
73
+ ]
74
+ BUILDER_CONFIG_CLASS = WikiSourceConfig
75
+
76
+ def _info(self):
77
+ return datasets.DatasetInfo(
78
+ description=_DESCRIPTION,
79
+ features=datasets.Features(
80
+ {
81
+ "id": datasets.Value("string"),
82
+ "translation": datasets.Translation(languages=(self.config.lang1, self.config.lang2)),
83
+ },
84
+ ),
85
+ supervised_keys=None,
86
+ homepage=_HOMEPAGE_URL,
87
+ citation=_CITATION,
88
+ )
89
+
90
+ def _split_generators(self, dl_manager):
91
+ def _base_url(lang1, lang2):
92
+ return _BASE_URL.format(lang1, lang2)
93
+
94
+ download_url = _base_url(self.config.lang1, self.config.lang2)
95
+ path = dl_manager.download_and_extract(download_url)
96
+ return [
97
+ datasets.SplitGenerator(
98
+ name=datasets.Split.TRAIN,
99
+ gen_kwargs={"datapath": path},
100
+ )
101
+ ]
102
+
103
+ def _generate_examples(self, datapath):
104
+ l1, l2 = self.config.lang1, self.config.lang2
105
+ folder = l1 + "-" + l2
106
+ l1_file = _BASE_NAME.format(folder, l1)
107
+ l2_file = _BASE_NAME.format(folder, l2)
108
+ l1_path = os.path.join(datapath, l1_file)
109
+ l2_path = os.path.join(datapath, l2_file)
110
+ with open(l1_path, encoding="utf-8") as f1, open(l2_path, encoding="utf-8") as f2:
111
+ for sentence_counter, (x, y) in enumerate(zip(f1, f2)):
112
+ x = x.strip()
113
+ y = y.strip()
114
+ result = (
115
+ sentence_counter,
116
+ {
117
+ "id": str(sentence_counter),
118
+ "translation": {l1: x, l2: y},
119
+ },
120
+ )
121
+ yield result