system HF staff commited on
Commit
80626cb
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
+ - br
8
+ - fr
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/OfisPublik.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
+ {"br-fr": {"description": "Texts from the Ofis Publik ar Brezhoneg (Breton Language Board) provided by Francis Tyers\n2 languages, total number of files: 278\ntotal number of tokens: 2.12M\ntotal number of sentence fragments: 0.13M\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/OfisPublik.php", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["br", "fr"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "ofis_publik", "config_name": "br-fr", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 12256825, "num_examples": 63422, "dataset_name": "ofis_publik"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-OfisPublik/v1/moses/br-fr.txt.zip": {"num_bytes": 3856983, "checksum": "c57092899635854619cac5d51abf387f3d4ce4d28c4a468bb8df086dc2c3dac7"}}, "download_size": 3856983, "post_processing_size": null, "dataset_size": 12256825, "size_in_bytes": 16113808}}
dummy/br-fr/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e2bf1802651965eb8c66e9208dfd997f84ca0b9af91a964dcb0ee5f44f508dd9
3
+ size 1401
ofis_publik.py ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ Texts from the Ofis Publik ar Brezhoneg (Breton Language Board) provided by Francis Tyers
24
+ 2 languages, total number of files: 278
25
+ total number of tokens: 2.12M
26
+ total number of sentence fragments: 0.13M
27
+ """
28
+ _HOMEPAGE_URL = "http://opus.nlpl.eu/OfisPublik.php"
29
+ _CITATION = """\
30
+ @InProceedings{TIEDEMANN12.463,
31
+ author = {J{\"o}rg Tiedemann},
32
+ title = {Parallel Data, Tools and Interfaces in OPUS},
33
+ booktitle = {Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12)},
34
+ year = {2012},
35
+ month = {may},
36
+ date = {23-25},
37
+ address = {Istanbul, Turkey},
38
+ 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},
39
+ publisher = {European Language Resources Association (ELRA)},
40
+ isbn = {978-2-9517408-7-7},
41
+ language = {english}
42
+ }
43
+ @inproceedings{tyers-2009-rule,
44
+ title = "Rule-Based Augmentation of Training Data in {B}reton-{F}rench Statistical Machine Translation",
45
+ author = "Tyers, Francis M.",
46
+ booktitle = "Proceedings of the 13th Annual conference of the European Association for Machine Translation",
47
+ month = may # " 14{--}15",
48
+ year = "2009",
49
+ address = "Barcelona, Spain",
50
+ publisher = "European Association for Machine Translation",
51
+ url = "https://www.aclweb.org/anthology/2009.eamt-1.29",
52
+ }
53
+ """
54
+
55
+ _VERSION = "1.0.0"
56
+ _BASE_NAME = "OfisPublik.{}.{}"
57
+ _BASE_URL = "https://object.pouta.csc.fi/OPUS-OfisPublik/v1/moses/{}-{}.txt.zip"
58
+
59
+ _LANGUAGE_PAIRS = [
60
+ ("br", "fr"),
61
+ ]
62
+
63
+
64
+ class OfisPublikConfig(datasets.BuilderConfig):
65
+ def __init__(self, *args, lang1=None, lang2=None, **kwargs):
66
+ super().__init__(
67
+ *args,
68
+ name=f"{lang1}-{lang2}",
69
+ **kwargs,
70
+ )
71
+ self.lang1 = lang1
72
+ self.lang2 = lang2
73
+
74
+
75
+ class OfisPublik(datasets.GeneratorBasedBuilder):
76
+ BUILDER_CONFIGS = [
77
+ OfisPublikConfig(
78
+ lang1=lang1,
79
+ lang2=lang2,
80
+ description=f"Translating {lang1} to {lang2} or vice versa",
81
+ version=datasets.Version(_VERSION),
82
+ )
83
+ for lang1, lang2 in _LANGUAGE_PAIRS
84
+ ]
85
+ BUILDER_CONFIG_CLASS = OfisPublikConfig
86
+
87
+ def _info(self):
88
+ return datasets.DatasetInfo(
89
+ description=_DESCRIPTION,
90
+ features=datasets.Features(
91
+ {
92
+ "id": datasets.Value("string"),
93
+ "translation": datasets.Translation(languages=(self.config.lang1, self.config.lang2)),
94
+ },
95
+ ),
96
+ supervised_keys=None,
97
+ homepage=_HOMEPAGE_URL,
98
+ citation=_CITATION,
99
+ )
100
+
101
+ def _split_generators(self, dl_manager):
102
+ def _base_url(lang1, lang2):
103
+ return _BASE_URL.format(lang1, lang2)
104
+
105
+ download_url = _base_url(self.config.lang1, self.config.lang2)
106
+ path = dl_manager.download_and_extract(download_url)
107
+ return [
108
+ datasets.SplitGenerator(
109
+ name=datasets.Split.TRAIN,
110
+ gen_kwargs={"datapath": path},
111
+ )
112
+ ]
113
+
114
+ def _generate_examples(self, datapath):
115
+ l1, l2 = self.config.lang1, self.config.lang2
116
+ folder = l1 + "-" + l2
117
+ l1_file = _BASE_NAME.format(folder, l1)
118
+ l2_file = _BASE_NAME.format(folder, l2)
119
+ l1_path = os.path.join(datapath, l1_file)
120
+ l2_path = os.path.join(datapath, l2_file)
121
+ with open(l1_path, encoding="utf-8") as f1, open(l2_path, encoding="utf-8") as f2:
122
+ for sentence_counter, (x, y) in enumerate(zip(f1, f2)):
123
+ x = x.strip()
124
+ y = y.strip()
125
+ result = (
126
+ sentence_counter,
127
+ {
128
+ "id": str(sentence_counter),
129
+ "translation": {l1: x, l2: y},
130
+ },
131
+ )
132
+ yield result