Datasets:
Commit
·
bf981b3
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
- .gitattributes +27 -0
- README.md +195 -0
- dataset_infos.json +1 -0
- dummy/0.0.0/dummy_data.zip +3 -0
- id_puisi.py +74 -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,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- no-annotation
|
4 |
+
language_creators:
|
5 |
+
- found
|
6 |
+
languages:
|
7 |
+
- id
|
8 |
+
licenses:
|
9 |
+
- mit
|
10 |
+
multilinguality:
|
11 |
+
- monolingual
|
12 |
+
size_categories:
|
13 |
+
- 1K<n<10K
|
14 |
+
source_datasets:
|
15 |
+
- original
|
16 |
+
task_categories:
|
17 |
+
- conditional-text-generation
|
18 |
+
- sequence-modeling
|
19 |
+
task_ids:
|
20 |
+
- language-modeling
|
21 |
+
- other-stuctured-to-text
|
22 |
+
---
|
23 |
+
|
24 |
+
# Dataset Card for id_puisi
|
25 |
+
|
26 |
+
## Table of Contents
|
27 |
+
- [Dataset Card for id_puisi](#dataset-card-for-id_puisi)
|
28 |
+
- [Table of Contents](#table-of-contents)
|
29 |
+
- [Dataset Description](#dataset-description)
|
30 |
+
- [Dataset Summary](#dataset-summary)
|
31 |
+
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
32 |
+
- [Languages](#languages)
|
33 |
+
- [Dataset Structure](#dataset-structure)
|
34 |
+
- [Data Instances](#data-instances)
|
35 |
+
- [Data Fields](#data-fields)
|
36 |
+
- [Data Splits](#data-splits)
|
37 |
+
- [Dataset Creation](#dataset-creation)
|
38 |
+
- [Curation Rationale](#curation-rationale)
|
39 |
+
- [Source Data](#source-data)
|
40 |
+
- [Initial Data Collection and Normalization](#initial-data-collection-and-normalization)
|
41 |
+
- [Who are the source language producers?](#who-are-the-source-language-producers)
|
42 |
+
- [Annotations](#annotations)
|
43 |
+
- [Annotation process](#annotation-process)
|
44 |
+
- [Who are the annotators?](#who-are-the-annotators)
|
45 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
46 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
47 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
48 |
+
- [Discussion of Biases](#discussion-of-biases)
|
49 |
+
- [Other Known Limitations](#other-known-limitations)
|
50 |
+
- [Additional Information](#additional-information)
|
51 |
+
- [Dataset Curators](#dataset-curators)
|
52 |
+
- [Licensing Information](#licensing-information)
|
53 |
+
- [Citation Information](#citation-information)
|
54 |
+
|
55 |
+
## Dataset Description
|
56 |
+
|
57 |
+
- **Homepage:** [puisi-pantun-generator](https://github.com/ilhamfp/puisi-pantun-generator)
|
58 |
+
- **Repository:** [puisi-pantun-generator](https://github.com/ilhamfp/puisi-pantun-generator)
|
59 |
+
- **Paper:** [N/A]
|
60 |
+
- **Leaderboard:** [N/A]
|
61 |
+
- **Point of Contact:** [Ilham Firdausi Putra]([email protected])
|
62 |
+
|
63 |
+
### Dataset Summary
|
64 |
+
|
65 |
+
Puisi (poem) is an Indonesian poetic form. The dataset contains 7223 Indonesian puisi with its title and author.
|
66 |
+
|
67 |
+
### Supported Tasks and Leaderboards
|
68 |
+
|
69 |
+
[More Information Needed]
|
70 |
+
|
71 |
+
### Languages
|
72 |
+
|
73 |
+
Indonesian
|
74 |
+
|
75 |
+
## Dataset Structure
|
76 |
+
|
77 |
+
### Data Instances
|
78 |
+
```
|
79 |
+
{
|
80 |
+
'puisi_with_header': 'TEPERANGKAP
|
81 |
+
Oleh Mangku Langit Jingga
|
82 |
+
|
83 |
+
Mungkin kau membiarkan aku
|
84 |
+
Membiarkan perasaan ini larut
|
85 |
+
Memberi ruang jiwaku hampa
|
86 |
+
Agar tetap terbiasa nikmati
|
87 |
+
|
88 |
+
Perangkap yang kau buat
|
89 |
+
Perisai yang kau banggakan
|
90 |
+
Takkan jadi tameng bagimu
|
91 |
+
Aku mengerti betapa hebatnya
|
92 |
+
|
93 |
+
Perangkap mu hei sang dewi
|
94 |
+
Ku akan terus merasa terbiasa
|
95 |
+
Dengan pesona indahmu
|
96 |
+
Ku masih akan nikmati hadirmu
|
97 |
+
|
98 |
+
Berjalanlah pada hati yang sama
|
99 |
+
Satu hati denganku
|
100 |
+
Walau ku terperangkap
|
101 |
+
Namunku nikmati dan jalani',
|
102 |
+
|
103 |
+
'title': 'TEPERANGKAP',
|
104 |
+
|
105 |
+
'author': 'Oleh Mangku Langit Jingga',
|
106 |
+
|
107 |
+
'puisi': 'Mungkin kau membiarkan aku
|
108 |
+
Membiarkan perasaan ini larut
|
109 |
+
Memberi ruang jiwaku hampa
|
110 |
+
Agar tetap terbiasa nikmati
|
111 |
+
|
112 |
+
Perangkap yang kau buat
|
113 |
+
Perisai yang kau banggakan
|
114 |
+
Takkan jadi tameng bagimu
|
115 |
+
Aku mengerti betapa hebatnya
|
116 |
+
|
117 |
+
Perangkap mu hei sang dewi
|
118 |
+
Ku akan terus merasa terbiasa
|
119 |
+
Dengan pesona indahmu
|
120 |
+
Ku masih akan nikmati hadirmu
|
121 |
+
|
122 |
+
Berjalanlah pada hati yang sama
|
123 |
+
Satu hati denganku
|
124 |
+
Walau ku terperangkap
|
125 |
+
Namunku nikmati dan jalani',
|
126 |
+
}
|
127 |
+
```
|
128 |
+
### Data Fields
|
129 |
+
|
130 |
+
- `puisi_with_header`: the raw text from scraping
|
131 |
+
- `title`: the title extracted from the raw text using regex
|
132 |
+
- `author`: the author extracted from the raw text using regex
|
133 |
+
- `puisi`: the poem with title and author extracted out using regex
|
134 |
+
|
135 |
+
### Data Splits
|
136 |
+
|
137 |
+
The dataset contains only a train set.
|
138 |
+
|
139 |
+
## Dataset Creation
|
140 |
+
|
141 |
+
### Curation Rationale
|
142 |
+
|
143 |
+
The dataset was initially collected as an experiment to generate an Indonesian poem using GPT-2.
|
144 |
+
|
145 |
+
### Source Data
|
146 |
+
|
147 |
+
#### Initial Data Collection and Normalization
|
148 |
+
|
149 |
+
The dataset was scraped using BeautifulSoup from lokerpuisi.web.id (the data no longer exist on the original blog). The title and author column was produced using regex match from puisi_with_header column.
|
150 |
+
|
151 |
+
#### Who are the source language producers?
|
152 |
+
|
153 |
+
The poems were generated by humans. The users of the original blog voluntarily submit their original poems to get published on the blog.
|
154 |
+
|
155 |
+
### Annotations
|
156 |
+
|
157 |
+
#### Annotation process
|
158 |
+
|
159 |
+
[N/A]
|
160 |
+
|
161 |
+
#### Who are the annotators?
|
162 |
+
|
163 |
+
[N/A]
|
164 |
+
|
165 |
+
### Personal and Sensitive Information
|
166 |
+
|
167 |
+
[More Information Needed]
|
168 |
+
|
169 |
+
## Considerations for Using the Data
|
170 |
+
|
171 |
+
### Social Impact of Dataset
|
172 |
+
|
173 |
+
[More Information Needed]
|
174 |
+
|
175 |
+
### Discussion of Biases
|
176 |
+
|
177 |
+
[More Information Needed]
|
178 |
+
|
179 |
+
### Other Known Limitations
|
180 |
+
|
181 |
+
The regex match used to extract the title & author from the raw text is not perfect. Some title & text is still failed to get extracted.
|
182 |
+
|
183 |
+
## Additional Information
|
184 |
+
|
185 |
+
### Dataset Curators
|
186 |
+
|
187 |
+
Ilham Firdausi Putra
|
188 |
+
|
189 |
+
### Licensing Information
|
190 |
+
|
191 |
+
MIT License
|
192 |
+
|
193 |
+
### Citation Information
|
194 |
+
|
195 |
+
[N/A]
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"default": {"description": "Puisi (poem) is an Indonesian poetic form. The dataset contains 7223 Indonesian puisi with its title and author.\n", "citation": "", "homepage": "https://github.com/ilhamfp/puisi-pantun-generator", "license": "", "features": {"title": {"dtype": "string", "id": null, "_type": "Value"}, "author": {"dtype": "string", "id": null, "_type": "Value"}, "puisi": {"dtype": "string", "id": null, "_type": "Value"}, "puisi_with_header": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "id_puisi", "config_name": "default", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 10613475, "num_examples": 7223, "dataset_name": "id_puisi"}}, "download_checksums": {"https://raw.githubusercontent.com/ilhamfp/puisi-pantun-generator/main/data/puisi.csv": {"num_bytes": 10558108, "checksum": "c9f9297063468d256fafddb673d1eef81fa625d6edb7325bfec0b16ad0d193c9"}}, "download_size": 10558108, "post_processing_size": null, "dataset_size": 10613475, "size_in_bytes": 21171583}}
|
dummy/0.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ab2e606d06932ea1bdc23028335673a8d06eef6dd0b5833169b37344c44b9699
|
3 |
+
size 870
|
id_puisi.py
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
|
16 |
+
# Lint as: python3
|
17 |
+
"""ID Puisi: A Dataset for Indonesian Poem"""
|
18 |
+
|
19 |
+
from __future__ import absolute_import, division, print_function
|
20 |
+
|
21 |
+
import csv
|
22 |
+
|
23 |
+
import datasets
|
24 |
+
|
25 |
+
|
26 |
+
_DESCRIPTION = """\
|
27 |
+
Puisi (poem) is an Indonesian poetic form. The dataset contains 7223 Indonesian puisi with its title and author.
|
28 |
+
"""
|
29 |
+
|
30 |
+
_TRAIN_DOWNLOAD_URL = "https://raw.githubusercontent.com/ilhamfp/puisi-pantun-generator/main/data/puisi.csv"
|
31 |
+
|
32 |
+
|
33 |
+
class IDPuisi(datasets.GeneratorBasedBuilder):
|
34 |
+
"""ID Puisi: A Datases for Indonesian Poem"""
|
35 |
+
|
36 |
+
def _info(self):
|
37 |
+
return datasets.DatasetInfo(
|
38 |
+
description=_DESCRIPTION,
|
39 |
+
features=datasets.Features(
|
40 |
+
{
|
41 |
+
"title": datasets.Value("string"),
|
42 |
+
"author": datasets.Value("string"),
|
43 |
+
"puisi": datasets.Value("string"),
|
44 |
+
"puisi_with_header": datasets.Value("string"),
|
45 |
+
}
|
46 |
+
),
|
47 |
+
homepage="https://github.com/ilhamfp/puisi-pantun-generator",
|
48 |
+
)
|
49 |
+
|
50 |
+
def _split_generators(self, dl_manager):
|
51 |
+
train_path = dl_manager.download_and_extract(_TRAIN_DOWNLOAD_URL)
|
52 |
+
return [
|
53 |
+
datasets.SplitGenerator(
|
54 |
+
name=datasets.Split.TRAIN,
|
55 |
+
gen_kwargs={
|
56 |
+
"filepath": train_path,
|
57 |
+
},
|
58 |
+
),
|
59 |
+
]
|
60 |
+
|
61 |
+
def _generate_examples(self, filepath):
|
62 |
+
"""Generate ID Puisi examples."""
|
63 |
+
with open(filepath, encoding="utf-8") as csv_file:
|
64 |
+
csv_reader = csv.reader(
|
65 |
+
csv_file,
|
66 |
+
delimiter=",",
|
67 |
+
quoting=csv.QUOTE_ALL,
|
68 |
+
)
|
69 |
+
for id_, row in enumerate(csv_reader):
|
70 |
+
if id_ == 0:
|
71 |
+
# Skip header
|
72 |
+
continue
|
73 |
+
|
74 |
+
yield id_, {"puisi": row[0], "title": row[1], "author": row[2], "puisi_with_header": row[3]}
|