system HF staff commited on
Commit
08a4537
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

Files changed (5) hide show
  1. .gitattributes +27 -0
  2. README.md +149 -0
  3. dataset_infos.json +1 -0
  4. dummy/1.1.0/dummy_data.zip +3 -0
  5. nsmc.py +99 -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,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - crowdsourced
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - ko
8
+ licenses:
9
+ - cc-by-1-0
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 100K<n<1M
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - text-classification
18
+ task_ids:
19
+ - sentiment-classification
20
+ ---
21
+
22
+ # Dataset Card for Naver sentiment movie corpus
23
+
24
+ ## Table of Contents
25
+
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:** [Github](https://github.com/e9t/nsmc/)
51
+ - **Repository:** [Github](https://github.com/e9t/nsmc/)
52
+ - **Paper:**
53
+ - **Leaderboard:**
54
+ - **Point of Contact:**
55
+
56
+ ### Dataset Summary
57
+
58
+ [More Information Needed]
59
+
60
+ ### Supported Tasks and Leaderboards
61
+
62
+ [More Information Needed]
63
+
64
+ ### Languages
65
+
66
+ [More Information Needed]
67
+
68
+ ## Dataset Structure
69
+
70
+ ### Data Instances
71
+
72
+ [More Information Needed]
73
+
74
+ ### Data Fields
75
+
76
+ Each instance is a movie review written by Korean internet users on Naver, the most commonly used search engine in Korea. Each row can be broken down into the following fields:
77
+
78
+ - `id`: A unique review ID, provided by Naver
79
+ - `document`: The actual movie review
80
+ - `label`: Binary labels for sentiment analysis, where `0` denotes negative, and `1`, positive
81
+
82
+ ### Data Splits
83
+
84
+ [More Information Needed]
85
+
86
+ ## Dataset Creation
87
+
88
+ ### Curation Rationale
89
+
90
+ [More Information Needed]
91
+
92
+ ### Source Data
93
+
94
+ #### Initial Data Collection and Normalization
95
+
96
+ [More Information Needed]
97
+
98
+ #### Who are the source language producers?
99
+
100
+ [More Information Needed]
101
+
102
+ ### Annotations
103
+
104
+ #### Annotation process
105
+
106
+ [More Information Needed]
107
+
108
+ #### Who are the annotators?
109
+
110
+ [More Information Needed]
111
+
112
+ ### Personal and Sensitive Information
113
+
114
+ [More Information Needed]
115
+
116
+ ## Considerations for Using the Data
117
+
118
+ ### Social Impact of Dataset
119
+
120
+ [More Information Needed]
121
+
122
+ ### Discussion of Biases
123
+
124
+ [More Information Needed]
125
+
126
+ ### Other Known Limitations
127
+
128
+ [More Information Needed]
129
+
130
+ ## Additional Information
131
+
132
+ ### Dataset Curators
133
+
134
+ [More Information Needed]
135
+
136
+ ### Licensing Information
137
+
138
+ [More Information Needed]
139
+
140
+ ### Citation Information
141
+
142
+ ```
143
+ @InProceedings{Park:2016,
144
+ title = "Naver Sentiment Movie Corpus",
145
+ author = "Lucy Park",
146
+ year = "2016",
147
+ howpublished = {\\url{https://github.com/e9t/nsmc}}
148
+ }
149
+ ```
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"default": {"description": "This is a movie review dataset in the Korean language. Reviews were scraped from Naver movies. The dataset construction is based on the method noted in Large movie review dataset from Maas et al., 2011.\n", "citation": "@InProceedings{Park:2016,\n title = \"Naver Sentiment Movie Corpus\",\n author = \"Lucy Park\",\n year = \"2016\",\n howpublished = {\\url{https://github.com/e9t/nsmc}}\n}\n", "homepage": "https://github.com/e9t/nsmc/", "license": "CC0 1.0 Universal (CC0 1.0)", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "document": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 2, "names": ["negative", "positive"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "nsmc", "config_name": "default", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 16423803, "num_examples": 150000, "dataset_name": "nsmc"}, "test": {"name": "test", "num_bytes": 5491417, "num_examples": 50000, "dataset_name": "nsmc"}}, "download_checksums": {"https://raw.githubusercontent.com/e9t/nsmc/master/ratings_train.txt": {"num_bytes": 14628807, "checksum": "e03b7d14e9e41be8d464a28057cd25d7396c53e67aa7fd5f7e552c59b0ee2940"}, "https://raw.githubusercontent.com/e9t/nsmc/master/ratings_test.txt": {"num_bytes": 4893335, "checksum": "8ac9f64052f11dbf6ae0acb5e038f03d90a76f0eda7820cfb3a92d02edfcebda"}}, "download_size": 19522142, "post_processing_size": null, "dataset_size": 21915220, "size_in_bytes": 41437362}}
dummy/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a1400fb173581fdfdb166cd9af0706a739b062e0989553c286ef2e8bfa83bf3c
3
+ size 886
nsmc.py ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """Naver movie review corpus for binary sentiment classification"""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import csv
20
+
21
+ import datasets
22
+
23
+
24
+ _CITATION = """\
25
+ @InProceedings{Park:2016,
26
+ title = "Naver Sentiment Movie Corpus",
27
+ author = "Lucy Park",
28
+ year = "2016",
29
+ howpublished = {\\url{https://github.com/e9t/nsmc}}
30
+ }
31
+ """
32
+
33
+ _DESCRIPTION = """\
34
+ This is a movie review dataset in the Korean language. Reviews were scraped from Naver movies. The dataset construction is based on the method noted in Large movie review dataset from Maas et al., 2011.
35
+ """
36
+
37
+ _HOMEPAGE = "https://github.com/e9t/nsmc/"
38
+
39
+ _LICENSE = "CC0 1.0 Universal (CC0 1.0)"
40
+
41
+
42
+ _URL = "https://raw.githubusercontent.com/e9t/nsmc/master/"
43
+ _URLs = {
44
+ "train": _URL + "ratings_train.txt",
45
+ "test": _URL + "ratings_test.txt",
46
+ }
47
+
48
+
49
+ # TODO: Name of the dataset usually match the script name with CamelCase instead of snake_case
50
+ class NSMC(datasets.GeneratorBasedBuilder):
51
+ """Korean Naver movie review dataset."""
52
+
53
+ VERSION = datasets.Version("1.1.0")
54
+
55
+ def _info(self):
56
+ return datasets.DatasetInfo(
57
+ description=_DESCRIPTION,
58
+ features=datasets.Features(
59
+ {
60
+ "id": datasets.Value("string"),
61
+ "document": datasets.Value("string"),
62
+ "label": datasets.ClassLabel(names=["negative", "positive"]),
63
+ }
64
+ ),
65
+ supervised_keys=None,
66
+ homepage=_HOMEPAGE,
67
+ license=_LICENSE,
68
+ citation=_CITATION,
69
+ )
70
+
71
+ def _split_generators(self, dl_manager):
72
+ downloaded_files = dl_manager.download_and_extract(_URLs)
73
+ return [
74
+ datasets.SplitGenerator(
75
+ name=datasets.Split.TRAIN,
76
+ gen_kwargs={
77
+ "filepath": downloaded_files["train"],
78
+ "split": "train",
79
+ },
80
+ ),
81
+ datasets.SplitGenerator(
82
+ name=datasets.Split.TEST,
83
+ gen_kwargs={
84
+ "filepath": downloaded_files["test"],
85
+ "split": "test",
86
+ },
87
+ ),
88
+ ]
89
+
90
+ def _generate_examples(self, filepath, split):
91
+ with open(filepath, encoding="utf-8") as f:
92
+ next(f)
93
+ reader = csv.reader(f, delimiter="\t")
94
+ for id_, row in enumerate(reader):
95
+ yield id_, {
96
+ "id": row[0],
97
+ "document": row[1],
98
+ "label": int(row[2]),
99
+ }