andreaschandra commited on
Commit
5612349
1 Parent(s): 02fe71d
Files changed (3) hide show
  1. README.md +124 -1
  2. dataset_infos.json +1 -0
  3. id-paraphrase-detection.py +76 -0
README.md CHANGED
@@ -1,3 +1,126 @@
1
  ---
2
- license: cc-by-4.0
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 Sentence Paraphrase Detection
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
+ The dataset is originally from [Microsoft Research Paraphrase Corpus](https://www.microsoft.com/en-us/download/details.aspx?id=52398). We translated the text into Bahasa using google translate.
43
+
44
+ ### Supported Tasks and Leaderboards
45
+
46
+ [More Information Needed]
47
+
48
+ ### Languages
49
+
50
+ Indonesian
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 sequence to sequence classification\n", "citation": "", "homepage": "https://github.com/jakartaresearch", "license": "", "features": {"sentence1": {"dtype": "string", "id": null, "_type": "Value"}, "sentence2": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"dtype": "int8", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "google_play_review", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1054295, "num_examples": 4076, "dataset_name": "google_play_review"}, "validation": {"name": "validation", "num_bytes": 443597, "num_examples": 1725, "dataset_name": "google_play_review"}}, "download_checksums": {"https://media.githubusercontent.com/media/jakartaresearch/hf-datasets/main/msrp/id_train.csv": {"num_bytes": 1052310, "checksum": "96bc09e4eb82174a0d46d7e4683d734a1cf876ebae66bc33df30c1fe4374e67c"}, "https://media.githubusercontent.com/media/jakartaresearch/hf-datasets/main/msrp/id_test.csv": {"num_bytes": 442613, "checksum": "a67c5b9b32f66a76c239818292ff9746756ea29edb81003bff157603749da56c"}}, "download_size": 1494923, "post_processing_size": null, "dataset_size": 1497892, "size_in_bytes": 2992815}}
id-paraphrase-detection.py ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """Indonesian Paraphrase Detection"""
16
+
17
+
18
+ import csv
19
+ import json
20
+ import os
21
+
22
+ import datasets
23
+
24
+ _DESCRIPTION = """\
25
+ This dataset is built as a playground for sequence to sequence classification
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/msrp/id_train.csv"
34
+ _VAL_URL = "https://media.githubusercontent.com/media/jakartaresearch/hf-datasets/main/msrp/id_test.csv"
35
+
36
+
37
+ # TODO: Name of the dataset usually match the script name with CamelCase instead of snake_case
38
+ class GooglePlayReview(datasets.GeneratorBasedBuilder):
39
+ """Indonesian Paraphrase Detection."""
40
+
41
+ VERSION = datasets.Version("1.0.0")
42
+
43
+ def _info(self):
44
+
45
+ features = datasets.Features(
46
+ {
47
+ "sentence1": datasets.Value("string"),
48
+ "sentence2": datasets.Value("string"),
49
+ "label": datasets.Value("int8")
50
+ }
51
+ )
52
+
53
+ return datasets.DatasetInfo(
54
+ description=_DESCRIPTION,
55
+ features=features,
56
+ homepage=_HOMEPAGE
57
+ )
58
+
59
+ def _split_generators(self, dl_manager):
60
+
61
+ train_path = dl_manager.download_and_extract(_TRAIN_URL)
62
+ val_path = dl_manager.download_and_extract(_VAL_URL)
63
+ return [
64
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": train_path}),
65
+ datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": val_path})
66
+ ]
67
+
68
+ # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
69
+ def _generate_examples(self, filepath):
70
+ """Generate examples."""
71
+ with open(filepath, encoding="utf-8") as csv_file:
72
+ csv_reader = csv.reader(csv_file, delimiter=",")
73
+ next(csv_reader)
74
+ for id_, row in enumerate(csv_reader):
75
+ sentence1, sentence2, label = row
76
+ yield id_, {"sentence1": sentence1, "sentence2": sentence2, "label": label}