Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
Indonesian
Size:
10K - 100K
License:
andreaschandra
commited on
Commit
•
056788b
1
Parent(s):
1737b28
add files
Browse files- README.md +124 -1
- dataset_infos.json +1 -0
- indo-movie-subtitle.py +73 -0
README.md
CHANGED
@@ -1,3 +1,126 @@
|
|
1 |
---
|
2 |
-
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
TODO: Add YAML tags here. Copy-paste the tags obtained with the online tagging app: https://huggingface.co/spaces/huggingface/datasets-tagging
|
3 |
---
|
4 |
+
|
5 |
+
# Dataset Card for Indonesian Movie Subtitle
|
6 |
+
|
7 |
+
## Table of Contents
|
8 |
+
- [Table of Contents](#table-of-contents)
|
9 |
+
- [Dataset Description](#dataset-description)
|
10 |
+
- [Dataset Summary](#dataset-summary)
|
11 |
+
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
12 |
+
- [Languages](#languages)
|
13 |
+
- [Dataset Structure](#dataset-structure)
|
14 |
+
- [Data Instances](#data-instances)
|
15 |
+
- [Data Fields](#data-fields)
|
16 |
+
- [Data Splits](#data-splits)
|
17 |
+
- [Dataset Creation](#dataset-creation)
|
18 |
+
- [Curation Rationale](#curation-rationale)
|
19 |
+
- [Source Data](#source-data)
|
20 |
+
- [Annotations](#annotations)
|
21 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
22 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
23 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
24 |
+
- [Discussion of Biases](#discussion-of-biases)
|
25 |
+
- [Other Known Limitations](#other-known-limitations)
|
26 |
+
- [Additional Information](#additional-information)
|
27 |
+
- [Dataset Curators](#dataset-curators)
|
28 |
+
- [Licensing Information](#licensing-information)
|
29 |
+
- [Citation Information](#citation-information)
|
30 |
+
- [Contributions](#contributions)
|
31 |
+
|
32 |
+
## Dataset Description
|
33 |
+
|
34 |
+
- **Homepage:**
|
35 |
+
- **Repository:**
|
36 |
+
- **Paper:**
|
37 |
+
- **Leaderboard:**
|
38 |
+
- **Point of Contact:**
|
39 |
+
|
40 |
+
### Dataset Summary
|
41 |
+
|
42 |
+
[More Information Needed]
|
43 |
+
|
44 |
+
### Supported Tasks and Leaderboards
|
45 |
+
|
46 |
+
[More Information Needed]
|
47 |
+
|
48 |
+
### Languages
|
49 |
+
|
50 |
+
[More Information Needed]
|
51 |
+
|
52 |
+
## Dataset Structure
|
53 |
+
|
54 |
+
### Data Instances
|
55 |
+
|
56 |
+
[More Information Needed]
|
57 |
+
|
58 |
+
### Data Fields
|
59 |
+
|
60 |
+
[More Information Needed]
|
61 |
+
|
62 |
+
### Data Splits
|
63 |
+
|
64 |
+
[More Information Needed]
|
65 |
+
|
66 |
+
## Dataset Creation
|
67 |
+
|
68 |
+
### Curation Rationale
|
69 |
+
|
70 |
+
[More Information Needed]
|
71 |
+
|
72 |
+
### Source Data
|
73 |
+
|
74 |
+
#### Initial Data Collection and Normalization
|
75 |
+
|
76 |
+
[More Information Needed]
|
77 |
+
|
78 |
+
#### Who are the source language producers?
|
79 |
+
|
80 |
+
[More Information Needed]
|
81 |
+
|
82 |
+
### Annotations
|
83 |
+
|
84 |
+
#### Annotation process
|
85 |
+
|
86 |
+
[More Information Needed]
|
87 |
+
|
88 |
+
#### Who are the annotators?
|
89 |
+
|
90 |
+
[More Information Needed]
|
91 |
+
|
92 |
+
### Personal and Sensitive Information
|
93 |
+
|
94 |
+
[More Information Needed]
|
95 |
+
|
96 |
+
## Considerations for Using the Data
|
97 |
+
|
98 |
+
### Social Impact of Dataset
|
99 |
+
|
100 |
+
[More Information Needed]
|
101 |
+
|
102 |
+
### Discussion of Biases
|
103 |
+
|
104 |
+
[More Information Needed]
|
105 |
+
|
106 |
+
### Other Known Limitations
|
107 |
+
|
108 |
+
[More Information Needed]
|
109 |
+
|
110 |
+
## Additional Information
|
111 |
+
|
112 |
+
### Dataset Curators
|
113 |
+
|
114 |
+
[More Information Needed]
|
115 |
+
|
116 |
+
### Licensing Information
|
117 |
+
|
118 |
+
[More Information Needed]
|
119 |
+
|
120 |
+
### Citation Information
|
121 |
+
|
122 |
+
[More Information Needed]
|
123 |
+
|
124 |
+
### Contributions
|
125 |
+
|
126 |
+
Thanks to [@andreaschandra](https://github.com/andreaschandra) for adding this dataset.
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"default": {"description": "This dataset is built as a playground for analyzing text on movie subtitle\n", "citation": "", "homepage": "https://github.com/jakartaresearch", "license": "", "features": {"movie_title": {"dtype": "string", "id": null, "_type": "Value"}, "order": {"dtype": "string", "id": null, "_type": "Value"}, "duration": {"dtype": "string", "id": null, "_type": "Value"}, "text": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "indo_movie_subtitle", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 2430951, "num_examples": 17740, "dataset_name": "indo_movie_subtitle"}}, "download_checksums": {"https://media.githubusercontent.com/media/jakartaresearch/hf-datasets/main/movie-subtitles/dataset.csv": {"num_bytes": 2307955, "checksum": "bb2561adcf76e1d03bdd7f7e88e30dd3800c00b41a151108d23ad866dc53f36d"}}, "download_size": 2307955, "post_processing_size": null, "dataset_size": 2430951, "size_in_bytes": 4738906}}
|
indo-movie-subtitle.py
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
|
2 |
+
#
|
3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4 |
+
# you may not use this file except in compliance with the License.
|
5 |
+
# You may obtain a copy of the License at
|
6 |
+
#
|
7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8 |
+
#
|
9 |
+
# Unless required by applicable law or agreed to in writing, software
|
10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
+
# See the License for the specific language governing permissions and
|
13 |
+
# limitations under the License.
|
14 |
+
"""Indonesian Movie Subtitle."""
|
15 |
+
|
16 |
+
|
17 |
+
import csv
|
18 |
+
import json
|
19 |
+
import os
|
20 |
+
|
21 |
+
import datasets
|
22 |
+
|
23 |
+
_DESCRIPTION = """\
|
24 |
+
This dataset is built as a playground for analyzing text on movie subtitle
|
25 |
+
"""
|
26 |
+
|
27 |
+
_HOMEPAGE = "https://github.com/jakartaresearch"
|
28 |
+
|
29 |
+
# TODO: Add link to the official dataset URLs here
|
30 |
+
# The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
|
31 |
+
# This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
|
32 |
+
_TRAIN_URL = "https://media.githubusercontent.com/media/jakartaresearch/hf-datasets/main/movie-subtitles/dataset.csv"
|
33 |
+
|
34 |
+
|
35 |
+
# TODO: Name of the dataset usually match the script name with CamelCase instead of snake_case
|
36 |
+
class IndoMovieSubtitle(datasets.GeneratorBasedBuilder):
|
37 |
+
"""Indonesian Movie Subtitle."""
|
38 |
+
|
39 |
+
VERSION = datasets.Version("1.0.0")
|
40 |
+
|
41 |
+
def _info(self):
|
42 |
+
|
43 |
+
features = datasets.Features(
|
44 |
+
{
|
45 |
+
"movie_title": datasets.Value("string"),
|
46 |
+
"order": datasets.Value("string"),
|
47 |
+
"duration": datasets.Value("string"),
|
48 |
+
"text": datasets.Value("string")
|
49 |
+
}
|
50 |
+
)
|
51 |
+
|
52 |
+
return datasets.DatasetInfo(
|
53 |
+
description=_DESCRIPTION,
|
54 |
+
features=features,
|
55 |
+
homepage=_HOMEPAGE
|
56 |
+
)
|
57 |
+
|
58 |
+
def _split_generators(self, dl_manager):
|
59 |
+
|
60 |
+
train_path = dl_manager.download_and_extract(_TRAIN_URL)
|
61 |
+
return [
|
62 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": train_path}),
|
63 |
+
]
|
64 |
+
|
65 |
+
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
66 |
+
def _generate_examples(self, filepath):
|
67 |
+
"""Generate examples."""
|
68 |
+
with open(filepath, encoding="utf-8") as csv_file:
|
69 |
+
csv_reader = csv.reader(csv_file, delimiter=",")
|
70 |
+
next(csv_reader)
|
71 |
+
for id_, row in enumerate(csv_reader):
|
72 |
+
movie_title, order, duration, text = row
|
73 |
+
yield id_, {"movie_title": movie_title, "order": order, "duration": duration, "text": text}
|