andreaschandra commited on
Commit
12c12eb
1 Parent(s): c73ba38

update files

Browse files
Files changed (3) hide show
  1. README.md +146 -1
  2. dataset_infos.json +1 -0
  3. news-title-gen.py +73 -0
README.md CHANGED
@@ -1,3 +1,148 @@
1
  ---
2
- license: cc-by-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ annotations_creators:
3
+ - no-annotation
4
+ language:
5
+ - id
6
+ language_creators:
7
+ - found
8
+ license:
9
+ - cc-by-4.0
10
+ multilinguality:
11
+ - monolingual
12
+ pretty_name: Indonesian News Title Generation
13
+ size_categories:
14
+ - 10K<n<100K
15
+ source_datasets:
16
+ - original
17
+ tags:
18
+ - newspapers
19
+ - title
20
+ - news
21
+ task_categories:
22
+ - text-generation
23
+ task_ids:
24
+ - language-modeling
25
  ---
26
+
27
+ # Dataset Card for Indonesian News Title Generation
28
+
29
+ ## Table of Contents
30
+ - [Table of Contents](#table-of-contents)
31
+ - [Dataset Description](#dataset-description)
32
+ - [Dataset Summary](#dataset-summary)
33
+ - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
34
+ - [Languages](#languages)
35
+ - [Dataset Structure](#dataset-structure)
36
+ - [Data Instances](#data-instances)
37
+ - [Data Fields](#data-fields)
38
+ - [Data Splits](#data-splits)
39
+ - [Dataset Creation](#dataset-creation)
40
+ - [Curation Rationale](#curation-rationale)
41
+ - [Source Data](#source-data)
42
+ - [Annotations](#annotations)
43
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
44
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
45
+ - [Social Impact of Dataset](#social-impact-of-dataset)
46
+ - [Discussion of Biases](#discussion-of-biases)
47
+ - [Other Known Limitations](#other-known-limitations)
48
+ - [Additional Information](#additional-information)
49
+ - [Dataset Curators](#dataset-curators)
50
+ - [Licensing Information](#licensing-information)
51
+ - [Citation Information](#citation-information)
52
+ - [Contributions](#contributions)
53
+
54
+ ## Dataset Description
55
+
56
+ - **Homepage:**
57
+ - **Repository:**
58
+ - **Paper:**
59
+ - **Leaderboard:**
60
+ - **Point of Contact:**
61
+
62
+ ### Dataset Summary
63
+
64
+ [More Information Needed]
65
+
66
+ ### Supported Tasks and Leaderboards
67
+
68
+ [More Information Needed]
69
+
70
+ ### Languages
71
+
72
+ [More Information Needed]
73
+
74
+ ## Dataset Structure
75
+
76
+ ### Data Instances
77
+
78
+ [More Information Needed]
79
+
80
+ ### Data Fields
81
+
82
+ [More Information Needed]
83
+
84
+ ### Data Splits
85
+
86
+ [More Information Needed]
87
+
88
+ ## Dataset Creation
89
+
90
+ ### Curation Rationale
91
+
92
+ [More Information Needed]
93
+
94
+ ### Source Data
95
+
96
+ #### Initial Data Collection and Normalization
97
+
98
+ [More Information Needed]
99
+
100
+ #### Who are the source language producers?
101
+
102
+ [More Information Needed]
103
+
104
+ ### Annotations
105
+
106
+ #### Annotation process
107
+
108
+ [More Information Needed]
109
+
110
+ #### Who are the annotators?
111
+
112
+ [More Information Needed]
113
+
114
+ ### Personal and Sensitive Information
115
+
116
+ [More Information Needed]
117
+
118
+ ## Considerations for Using the Data
119
+
120
+ ### Social Impact of Dataset
121
+
122
+ [More Information Needed]
123
+
124
+ ### Discussion of Biases
125
+
126
+ [More Information Needed]
127
+
128
+ ### Other Known Limitations
129
+
130
+ [More Information Needed]
131
+
132
+ ## Additional Information
133
+
134
+ ### Dataset Curators
135
+
136
+ [More Information Needed]
137
+
138
+ ### Licensing Information
139
+
140
+ [More Information Needed]
141
+
142
+ ### Citation Information
143
+
144
+ [More Information Needed]
145
+
146
+ ### Contributions
147
+
148
+ 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 for generating text for news title.\n", "citation": "", "homepage": "https://github.com/jakartaresearch", "license": "", "features": {"title": {"dtype": "string", "id": null, "_type": "Value"}, "link": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "news-title-gen", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 19299568, "num_examples": 100000, "dataset_name": "news-title-gen"}}, "download_checksums": {"https://media.githubusercontent.com/media/jakartaresearch/hf-datasets/main/news-title-gen/dataset.csv": {"num_bytes": 18532034, "checksum": "63094953bbb167dd857041af94dfe81c77650c30843b153d22ba8c20cf305425"}}, "download_size": 18532034, "post_processing_size": null, "dataset_size": 19299568, "size_in_bytes": 37831602}}
news-title-gen.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
+ # TODO: Address all TODOs and remove all explanatory comments
15
+ """News Title Generation Dataset."""
16
+
17
+
18
+ import csv
19
+ import json
20
+ import os
21
+
22
+ import datasets
23
+
24
+ _DESCRIPTION = """\
25
+ This dataset is built for generating text for news title.
26
+ """
27
+
28
+ _HOMEPAGE = "https://github.com/jakartaresearch"
29
+
30
+ # TODO: Add link to the official dataset URLs here
31
+ # The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
32
+ # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
33
+ _TRAIN_URL = "https://media.githubusercontent.com/media/jakartaresearch/hf-datasets/main/news-title-gen/dataset.csv"
34
+
35
+
36
+ # TODO: Name of the dataset usually match the script name with CamelCase instead of snake_case
37
+ class Indonews(datasets.GeneratorBasedBuilder):
38
+ """News Title Generation Dataset."""
39
+
40
+ VERSION = datasets.Version("1.0.0")
41
+
42
+ def _info(self):
43
+
44
+ features = datasets.Features(
45
+ {
46
+ "title": datasets.Value("string"),
47
+ "link": datasets.Value("string"),
48
+ "date": 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
+ title, link, date = row
73
+ yield id_, {"title": title, "link": link, "date": date}