system HF staff commited on
Commit
f2e8a6e
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,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - expert-generated
6
+ languages:
7
+ - en
8
+ - id
9
+ licenses:
10
+ - unknown
11
+ multilinguality:
12
+ - translation
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 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:** [PANL BPPT](http://digilib.bppt.go.id/sampul/p92-budiono.pdf)
51
+ - **Repository:** [PANL BPPT Repository](https://github.com/cahya-wirawan/indonesian-language-models/raw/master/data/BPPTIndToEngCorpusHalfM.zip)
52
+ - **Paper:** [Resource Report: Building Parallel Text Corpora for Multi-Domain Translation System](http://digilib.bppt.go.id/sampul/p92-budiono.pdf)
53
+ - **Leaderboard:**
54
+ - **Point of Contact:**
55
+
56
+ ### Dataset Summary
57
+ Parallel Text Corpora for Multi-Domain Translation System created by BPPT (Indonesian Agency for the Assessment and
58
+ Application of Technology) for PAN Localization Project (A Regional Initiative to Develop Local Language Computing
59
+ Capacity in Asia). The dataset contains around 24K sentences divided in 4 difference topics (Economic, international,
60
+ Science and Technology and Sport).
61
+ ### Supported Tasks and Leaderboards
62
+
63
+ [More Information Needed]
64
+
65
+ ### Languages
66
+
67
+ Indonesian
68
+
69
+ ## Dataset Structure
70
+
71
+ [More Information Needed]
72
+
73
+ ### Data Instances
74
+
75
+ An example of the dataset:
76
+ ```
77
+ {
78
+ 'id': '0',
79
+ 'topic': 0,
80
+ 'translation':
81
+ {
82
+ 'en': 'Minister of Finance Sri Mulyani Indrawati said that a sharp correction of the composite
83
+ inde x by up to 4 pct in Wedenesday?s trading was a mere temporary effect of regional factors like
84
+ decline in plantation commodity prices and the financial crisis in Thailand.',
85
+ 'id': 'Menteri Keuangan Sri Mulyani mengatakan koreksi tajam pada Indeks Harga Saham Gabungan
86
+ IHSG hingga sekitar 4 persen dalam perdagangan Rabu 10/1 hanya efek sesaat dari faktor-faktor regional
87
+ seperti penurunan harga komoditi perkebunan dan krisis finansial di Thailand.'
88
+ }
89
+ }
90
+ ```
91
+
92
+ ### Data Fields
93
+ - `id`: id of the sample
94
+ - `translation`: the parallel sentence english-indonesian
95
+ - `topic`: the topic of the sentence. It could be one of the following:
96
+ - Economic
97
+ - International
98
+ - Science and Technology
99
+ - Sport
100
+
101
+
102
+ ### Data Splits
103
+
104
+ The dataset is splitted in to train, validation and test sets.
105
+
106
+ ## Dataset Creation
107
+
108
+ ### Curation Rationale
109
+
110
+ [More Information Needed]
111
+
112
+ ### Source Data
113
+
114
+ #### Initial Data Collection and Normalization
115
+
116
+ [More Information Needed]
117
+
118
+ #### Who are the source language producers?
119
+
120
+ [More Information Needed]
121
+
122
+ ### Annotations
123
+
124
+ #### Annotation process
125
+
126
+ [More Information Needed]
127
+
128
+ #### Who are the annotators?
129
+
130
+ [More Information Needed]
131
+
132
+ ### Personal and Sensitive Information
133
+
134
+ [More Information Needed]
135
+
136
+ ## Considerations for Using the Data
137
+
138
+ ### Social Impact of Dataset
139
+
140
+ [More Information Needed]
141
+
142
+ ### Discussion of Biases
143
+
144
+ [More Information Needed]
145
+
146
+ ### Other Known Limitations
147
+
148
+ [More Information Needed]
149
+
150
+ ## Additional Information
151
+
152
+ ### Dataset Curators
153
+
154
+ [More Information Needed]
155
+
156
+ ### Licensing Information
157
+
158
+ [More Information Needed]
159
+
160
+ ### Citation Information
161
+
162
+ [More Information Needed]
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"id_panl_bppt": {"description": "Parallel Text Corpora for Multi-Domain Translation System created by BPPT (Indonesian Agency for the Assessment and\nApplication of Technology) for PAN Localization Project (A Regional Initiative to Develop Local Language Computing\nCapacity in Asia). The dataset contains around 24K sentences divided in 4 difference topics (Economic, international,\nScience and Technology and Sport).\n", "citation": "@inproceedings{id_panl_bppt,\n author = {PAN Localization - BPPT},\n title = {Parallel Text Corpora, English Indonesian},\n year = {2009},\n url = {http://digilib.bppt.go.id/sampul/p92-budiono.pdf},\n}\n", "homepage": "http://digilib.bppt.go.id/sampul/p92-budiono.pdf", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "translation": {"languages": ["en", "id"], "id": null, "_type": "Translation"}, "topic": {"num_classes": 4, "names": ["Economy", "International", "Science", "Sport"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "id_panl_bppt", "config_name": "id_panl_bppt", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 7455924, "num_examples": 24021, "dataset_name": "id_panl_bppt"}}, "download_checksums": {"https://github.com/cahya-wirawan/indonesian-language-models/raw/master/data/BPPTIndToEngCorpusHalfM.zip": {"num_bytes": 2366973, "checksum": "bb87a5f9a218916e3e0fb68dd38bdf30330ce4e3cde680597ed7cf150966cf62"}}, "download_size": 2366973, "post_processing_size": null, "dataset_size": 7455924, "size_in_bytes": 9822897}}
dummy/id_panl_bppt/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ad200e0d50220d5ad37e65d320190cdc5e437a758df21d997d0b8b82675bf3f
3
+ size 5753
id_panl_bppt.py ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """PANL BPPT"""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import logging
20
+ import os
21
+
22
+ import datasets
23
+
24
+
25
+ _CITATION = """\
26
+ @inproceedings{id_panl_bppt,
27
+ author = {PAN Localization - BPPT},
28
+ title = {Parallel Text Corpora, English Indonesian},
29
+ year = {2009},
30
+ url = {http://digilib.bppt.go.id/sampul/p92-budiono.pdf},
31
+ }
32
+ """
33
+
34
+ _DESCRIPTION = """\
35
+ Parallel Text Corpora for Multi-Domain Translation System created by BPPT (Indonesian Agency for the Assessment and
36
+ Application of Technology) for PAN Localization Project (A Regional Initiative to Develop Local Language Computing
37
+ Capacity in Asia). The dataset contains around 24K sentences divided in 4 difference topics (Economic, international,
38
+ Science and Technology and Sport).
39
+ """
40
+
41
+ _HOMEPAGE = "http://digilib.bppt.go.id/sampul/p92-budiono.pdf"
42
+
43
+ _LICENSE = ""
44
+
45
+ _URLs = ["https://github.com/cahya-wirawan/indonesian-language-models/raw/master/data/BPPTIndToEngCorpusHalfM.zip"]
46
+
47
+
48
+ class IdPanlBpptConfig(datasets.BuilderConfig):
49
+ """BuilderConfig for IdPanlBppt"""
50
+
51
+ def __init__(self, src_tag=None, tgt_tag=None, topics=None, **kwargs):
52
+ """BuilderConfig for IdPanlBppt.
53
+ Args:
54
+ **kwargs: keyword arguments forwarded to super.
55
+ """
56
+ super(IdPanlBpptConfig, self).__init__(**kwargs)
57
+ self.src_tag = src_tag
58
+ self.tgt_tag = tgt_tag
59
+ self.topics = topics
60
+
61
+
62
+ class IdPanlBppt(datasets.GeneratorBasedBuilder):
63
+ VERSION = datasets.Version("1.0.0")
64
+
65
+ BUILDER_CONFIGS = [
66
+ IdPanlBpptConfig(
67
+ name="id_panl_bppt",
68
+ version=VERSION,
69
+ description="IdPanlBppt dataset",
70
+ src_tag="en",
71
+ tgt_tag="id",
72
+ topics=[
73
+ {"name": "Economy", "words": "150K"},
74
+ {"name": "International", "words": "150K"},
75
+ {"name": "Science", "words": "100K"},
76
+ {"name": "Sport", "words": "100K"},
77
+ ],
78
+ ),
79
+ ]
80
+ BUILDER_CONFIG_CLASS = IdPanlBpptConfig
81
+
82
+ def _info(self):
83
+ features = datasets.Features(
84
+ {
85
+ "id": datasets.Value("string"),
86
+ "translation": datasets.features.Translation(languages=[self.config.src_tag, self.config.tgt_tag]),
87
+ "topic": datasets.features.ClassLabel(names=[topic["name"] for topic in self.config.topics]),
88
+ }
89
+ )
90
+ return datasets.DatasetInfo(
91
+ description=_DESCRIPTION,
92
+ features=features,
93
+ supervised_keys=None,
94
+ homepage=_HOMEPAGE,
95
+ license=_LICENSE,
96
+ citation=_CITATION,
97
+ )
98
+
99
+ def _split_generators(self, dl_manager):
100
+ my_urls = _URLs[0]
101
+ data_dir = dl_manager.download_and_extract(my_urls)
102
+ return [
103
+ datasets.SplitGenerator(
104
+ name=datasets.Split.TRAIN,
105
+ gen_kwargs={
106
+ "data_dir": os.path.join(data_dir, "plain"),
107
+ "split": "train",
108
+ },
109
+ ),
110
+ ]
111
+
112
+ def _generate_examples(self, data_dir, split):
113
+ logging.info("⏳ Generating %s examples from = %s", split, data_dir)
114
+ id = 0
115
+ for topic in self.config.topics:
116
+ src_path = "PANL-BPPT-{}-{}-{}w.txt".format(
117
+ topic["name"][:3].upper(), self.config.src_tag.upper(), topic["words"]
118
+ )
119
+ tgt_path = "PANL-BPPT-{}-{}-{}w.txt".format(
120
+ topic["name"][:3].upper(), self.config.tgt_tag.upper(), topic["words"]
121
+ )
122
+ with open(os.path.join(data_dir, src_path), encoding="utf-8") as f1, open(
123
+ os.path.join(data_dir, tgt_path), encoding="utf-8"
124
+ ) as f2:
125
+ src = f1.read().split("\n")[:-1]
126
+ tgt = f2.read().split("\n")[:-1]
127
+ for idx, (s, t) in enumerate(zip(src, tgt)):
128
+ yield id, {
129
+ "id": str(id),
130
+ "translation": {self.config.src_tag: s, self.config.tgt_tag: t},
131
+ "topic": topic["name"],
132
+ }
133
+ id += 1