system HF staff commited on
Commit
0357688
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,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - found
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - en
8
+ - xh
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 [Dataset Name]
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:**[XhosaNavy](http://opus.nlpl.eu/XhosaNavy-v1.php)
51
+ - **Repository:**
52
+ - **Paper:**
53
+ - **Leaderboard:**
54
+ - **Point of Contact:**
55
+
56
+ ### Dataset Summary
57
+ This corpus is part of OPUS - the open collection of parallel corpora
58
+ OPUS Website: http://opus.nlpl.eu
59
+
60
+
61
+ ### Supported Tasks and Leaderboards
62
+
63
+ The underlying task is machine translation from English to Xhosa
64
+
65
+ ### Languages
66
+
67
+ [More Information Needed]
68
+
69
+ ## Dataset Structure
70
+
71
+ ### Data Instances
72
+
73
+ [More Information Needed]
74
+
75
+ ### Data Fields
76
+
77
+ [More Information Needed]
78
+
79
+ ### Data Splits
80
+
81
+ [More Information Needed]
82
+
83
+ ## Dataset Creation
84
+
85
+ ### Curation Rationale
86
+
87
+ [More Information Needed]
88
+
89
+ ### Source Data
90
+
91
+ #### Initial Data Collection and Normalization
92
+
93
+ [More Information Needed]
94
+
95
+ #### Who are the source language producers?
96
+
97
+ [More Information Needed]
98
+
99
+ ### Annotations
100
+
101
+ #### Annotation process
102
+
103
+ [More Information Needed]
104
+
105
+ #### Who are the annotators?
106
+
107
+ [More Information Needed]
108
+
109
+ ### Personal and Sensitive Information
110
+
111
+ [More Information Needed]
112
+
113
+ ## Considerations for Using the Data
114
+
115
+ ### Social Impact of Dataset
116
+
117
+ [More Information Needed]
118
+
119
+ ### Discussion of Biases
120
+
121
+ [More Information Needed]
122
+
123
+ ### Other Known Limitations
124
+
125
+ [More Information Needed]
126
+
127
+ ## Additional Information
128
+
129
+ ### Dataset Curators
130
+
131
+ [More Information Needed]
132
+
133
+ ### Licensing Information
134
+
135
+ [More Information Needed]
136
+
137
+ ### Citation Information
138
+
139
+ J. Tiedemann, 2012, Parallel Data, Tools and Interfaces in OPUS. In Proceedings of the 8th International Conference on Language Resources and Evaluation (LREC 2012)
140
+
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"en-xh": {"description": "This dataset is designed for machine translation from English to Xhosa.", "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/XhosaNavy-v1.php", "license": "", "features": {"translation": {"languages": ["en", "xh"], "id": null, "_type": "Translation"}}, "post_processed": null, "supervised_keys": null, "builder_name": "opus_xhosanavy", "config_name": "en-xh", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 9654422, "num_examples": 49982, "dataset_name": "opus_xhosanavy"}}, "download_checksums": {"https://object.pouta.csc.fi/OPUS-XhosaNavy/v1/moses/en-xh.txt.zip": {"num_bytes": 3263865, "checksum": "30b079f60f9d0d51c1b6c09fe4d11fe7deeb24327f36c8e35247f383e3c6e19c"}}, "download_size": 3263865, "post_processing_size": null, "dataset_size": 9654422, "size_in_bytes": 12918287}}
dummy/en-xh/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f5bef4e4e9367537631438088e5bccc9237d7102fe171022742eea8d7cf2643f
3
+ size 826
opus_xhosanavy.py ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """XhosaNavy English -Xhosa"""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import os
20
+
21
+ import datasets
22
+
23
+
24
+ _CITATION = """\
25
+ J. Tiedemann, 2012, Parallel Data, Tools and Interfaces in OPUS. In Proceedings of the 8th International \
26
+ Conference on Language Resources and Evaluation (LREC 2012)"""
27
+
28
+ _HOMEPAGE = "http://opus.nlpl.eu/XhosaNavy-v1.php"
29
+
30
+
31
+ _LICENSE = ""
32
+
33
+ _DESCRIPTION = """\
34
+ This dataset is designed for machine translation from English to Xhosa."""
35
+
36
+
37
+ _URLs = {"train": "https://object.pouta.csc.fi/OPUS-XhosaNavy/v1/moses/en-xh.txt.zip"}
38
+
39
+
40
+ class OpusXhosanavy(datasets.GeneratorBasedBuilder):
41
+
42
+ VERSION = datasets.Version("1.0.0")
43
+
44
+ BUILDER_CONFIGS = [datasets.BuilderConfig(name="en-xh", version=VERSION, description="XhosaNavy English -Xhosa")]
45
+
46
+ def _info(self):
47
+ return datasets.DatasetInfo(
48
+ description=_DESCRIPTION,
49
+ features=datasets.Features(
50
+ {"translation": datasets.features.Translation(languages=tuple(self.config.name.split("-")))}
51
+ ),
52
+ supervised_keys=None,
53
+ homepage="http://opus.nlpl.eu/XhosaNavy-v1.php",
54
+ citation=_CITATION,
55
+ )
56
+
57
+ def _split_generators(self, dl_manager):
58
+ """Returns SplitGenerators."""
59
+ data_dir = dl_manager.download_and_extract(_URLs)
60
+ return [
61
+ datasets.SplitGenerator(
62
+ name=datasets.Split.TRAIN,
63
+ # These kwargs will be passed to _generate_examples
64
+ gen_kwargs={
65
+ "source_file": os.path.join(data_dir["train"], "XhosaNavy.en-xh.en"),
66
+ "target_file": os.path.join(data_dir["train"], "XhosaNavy.en-xh.xh"),
67
+ "split": "train",
68
+ },
69
+ ),
70
+ ]
71
+
72
+ def _generate_examples(self, source_file, target_file, split):
73
+ """This function returns the examples in the raw (text) form."""
74
+ with open(source_file, encoding="utf-8") as f:
75
+ source_sentences = f.read().split("\n")
76
+ with open(target_file, encoding="utf-8") as f:
77
+ target_sentences = f.read().split("\n")
78
+
79
+ assert len(target_sentences) == len(source_sentences), "Sizes do not match: %d vs %d for %s vs %s." % (
80
+ len(source_sentences),
81
+ len(target_sentences),
82
+ source_file,
83
+ target_file,
84
+ )
85
+
86
+ source, target = tuple(self.config.name.split("-"))
87
+ for idx, (l1, l2) in enumerate(zip(source_sentences, target_sentences)):
88
+ result = {"translation": {source: l1, target: l2}}
89
+ yield idx, result