Datasets:
Commit
•
973a0d1
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 +146 -0
- dataset_infos.json +1 -0
- dummy/turkishmoviesentiment/1.0.0/dummy_data.zip +3 -0
- turkish_movie_sentiment.py +118 -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,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- found
|
4 |
+
language_creators:
|
5 |
+
- found
|
6 |
+
languages:
|
7 |
+
- tr
|
8 |
+
licenses:
|
9 |
+
- unknown
|
10 |
+
multilinguality:
|
11 |
+
- monolingual
|
12 |
+
size_categories:
|
13 |
+
- 10K<n<100K
|
14 |
+
source_datasets:
|
15 |
+
- original
|
16 |
+
task_categories:
|
17 |
+
- text_classification
|
18 |
+
task_ids:
|
19 |
+
- sentiment-classification
|
20 |
+
- sentiment-scoring
|
21 |
+
---
|
22 |
+
|
23 |
+
# Dataset Card for TurkishMovieSentiment: This dataset contains turkish movie reviews.
|
24 |
+
|
25 |
+
## Table of Contents
|
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 |
+
- [Discussion of Social Impact and Biases](#discussion-of-social-impact-and-biases)
|
41 |
+
- [Other Known Limitations](#other-known-limitations)
|
42 |
+
- [Additional Information](#additional-information)
|
43 |
+
- [Dataset Curators](#dataset-curators)
|
44 |
+
- [Licensing Information](#licensing-information)
|
45 |
+
- [Citation Information](#citation-information)
|
46 |
+
|
47 |
+
## Dataset Description
|
48 |
+
|
49 |
+
- **Homepage:** [https://www.kaggle.com/mustfkeskin/turkish-movie-sentiment-analysis-dataset/tasks](https://www.kaggle.com/mustfkeskin/turkish-movie-sentiment-analysis-dataset/tasks)
|
50 |
+
- **Point of Contact:** [Mustafa Keskin](https://www.linkedin.com/in/mustfkeskin/)
|
51 |
+
|
52 |
+
### Dataset Summary
|
53 |
+
|
54 |
+
This data set is a dataset from kaggle consisting of Turkish movie reviews and scored between 0-5.
|
55 |
+
|
56 |
+
### Languages
|
57 |
+
|
58 |
+
The dataset is based on Turkish.
|
59 |
+
|
60 |
+
## Dataset Structure
|
61 |
+
|
62 |
+
### Data Instances
|
63 |
+
|
64 |
+
**Example 1:**
|
65 |
+
|
66 |
+
**Comment:** Jean Reno denince zaten leon filmi gelir akla izlemeyen kalmamıştır ama kaldıysada ee ne duruyorsun hemen izle :),
|
67 |
+
|
68 |
+
**Film_name:** Sevginin Gücü,
|
69 |
+
|
70 |
+
**Point:** 5,0
|
71 |
+
|
72 |
+
**Example 2:**
|
73 |
+
|
74 |
+
**Comment:** Bence güzel bi film olmush.İzlenmeli.İnsana şükretmek gerektini hatırlatıyor.Ama cok da poh pohlanacak bi sey yapmamıslar,
|
75 |
+
|
76 |
+
**Film_name:** Cinderella Man,
|
77 |
+
|
78 |
+
**Point:** 2,5
|
79 |
+
|
80 |
+
### Data Fields
|
81 |
+
|
82 |
+
- **comment**(string) : Contatins turkish movie review
|
83 |
+
- **film_name**(string) : Film name in Turkish.
|
84 |
+
- **point**(float) : [0-5] floating point
|
85 |
+
|
86 |
+
### Data Splits
|
87 |
+
|
88 |
+
It is not divided into Train set and Test set.
|
89 |
+
|
90 |
+
## Dataset Creation
|
91 |
+
|
92 |
+
### Curation Rationale
|
93 |
+
|
94 |
+
[More Information Needed]
|
95 |
+
|
96 |
+
### Source Data
|
97 |
+
|
98 |
+
[More Information Needed]
|
99 |
+
|
100 |
+
#### Initial Data Collection and Normalization
|
101 |
+
|
102 |
+
[More Information Needed]
|
103 |
+
|
104 |
+
#### Who are the source language producers?
|
105 |
+
|
106 |
+
[More Information Needed]
|
107 |
+
|
108 |
+
### Annotations
|
109 |
+
|
110 |
+
The dataset does not contain any additional annotations.
|
111 |
+
|
112 |
+
#### Annotation process
|
113 |
+
|
114 |
+
[More Information Needed]
|
115 |
+
|
116 |
+
#### Who are the annotators?
|
117 |
+
|
118 |
+
[More Information Needed]
|
119 |
+
|
120 |
+
### Personal and Sensitive Information
|
121 |
+
|
122 |
+
[More Information Needed]
|
123 |
+
|
124 |
+
## Considerations for Using the Data
|
125 |
+
|
126 |
+
### Discussion of Social Impact and Biases
|
127 |
+
|
128 |
+
[More Information Needed]
|
129 |
+
|
130 |
+
### Other Known Limitations
|
131 |
+
|
132 |
+
[More Information Needed]
|
133 |
+
|
134 |
+
## Additional Information
|
135 |
+
|
136 |
+
### Dataset Curators
|
137 |
+
|
138 |
+
The dataset was created by [Mustafa Keskin](https://www.linkedin.com/in/mustfkeskin/).
|
139 |
+
|
140 |
+
### Licensing Information
|
141 |
+
|
142 |
+
The data is under the [CC0: Public Domain](https://creativecommons.org/publicdomain/zero/1.0/)
|
143 |
+
|
144 |
+
### Citation Information
|
145 |
+
|
146 |
+
[More Information Needed]
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"default": {"description": "This data set is a dataset from kaggle consisting of Turkish movie reviews and scored between 0-5.\n", "citation": "", "homepage": "https://www.kaggle.com/mustfkeskin/turkish-movie-sentiment-analysis-dataset", "license": "CC0: Public Domain", "features": {"point": {"dtype": "float32", "id": null, "_type": "Value"}, "comment": {"dtype": "string", "id": null, "_type": "Value"}, "film_name": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "turkish_movie_sentiment", "config_name": "default", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 33954560, "num_examples": 83227, "dataset_name": "turkish_movie_sentiment"}}, "download_checksums": {}, "download_size": 0, "post_processing_size": null, "dataset_size": 33954560, "size_in_bytes": 33954560}}
|
dummy/turkishmoviesentiment/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cc5ed38f57f22cc6facf0fad1ea0c30846a422cb006d499f4001a7c7051c6301
|
3 |
+
size 3034
|
turkish_movie_sentiment.py
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
# Lint as: python3
|
16 |
+
"""TurkishMovieSentiment: This dataset contains turkish movie reviews."""
|
17 |
+
|
18 |
+
from __future__ import absolute_import, division, print_function
|
19 |
+
|
20 |
+
import csv
|
21 |
+
import logging
|
22 |
+
import os
|
23 |
+
|
24 |
+
import datasets
|
25 |
+
|
26 |
+
|
27 |
+
_DESCRIPTION = """\
|
28 |
+
This data set is a dataset from kaggle consisting of Turkish movie reviews and scored between 0-5.
|
29 |
+
"""
|
30 |
+
|
31 |
+
_CITATION = ""
|
32 |
+
_LICENSE = "CC0: Public Domain"
|
33 |
+
_HOMEPAGE = "https://www.kaggle.com/mustfkeskin/turkish-movie-sentiment-analysis-dataset"
|
34 |
+
_FILENAME = "turkish_movie_sentiment_dataset.csv"
|
35 |
+
|
36 |
+
|
37 |
+
class TurkishMovieSentimentConfig(datasets.BuilderConfig):
|
38 |
+
"""BuilderConfig for TurkishMovieSentiment"""
|
39 |
+
|
40 |
+
def __init__(self, **kwargs):
|
41 |
+
"""BuilderConfig for TurkishMovieSentiment.
|
42 |
+
Args:
|
43 |
+
**kwargs: keyword arguments forwarded to super.
|
44 |
+
"""
|
45 |
+
super(TurkishMovieSentimentConfig, self).__init__(**kwargs)
|
46 |
+
|
47 |
+
|
48 |
+
class TurkishMovieSentiment(datasets.GeneratorBasedBuilder):
|
49 |
+
"""TurkishMovieSentiment: This dataset contains turkish movie reviews."""
|
50 |
+
|
51 |
+
BUILDER_CONFIGS = [
|
52 |
+
TurkishMovieSentimentConfig(
|
53 |
+
name="turkishmoviesentiment",
|
54 |
+
version=datasets.Version("1.0.0"),
|
55 |
+
description="This dataset contains turkish movie reviews.",
|
56 |
+
),
|
57 |
+
]
|
58 |
+
|
59 |
+
@property
|
60 |
+
def manual_download_instructions(self):
|
61 |
+
return """\
|
62 |
+
You need to go to https://www.kaggle.com/mustfkeskin/turkish-movie-sentiment-analysis-dataset,
|
63 |
+
and manually download the TurkishMovieSentiment. Once it is completed,
|
64 |
+
a file named archive.zip will be appeared in your Downloads folder
|
65 |
+
or whichever folder your browser chooses to save files to. You then have
|
66 |
+
to unzip the file and move turkish_movie_sentiment_dataset.csv under <path/to/folder>.
|
67 |
+
The <path/to/folder> can e.g. be "~/manual_data".
|
68 |
+
TurkishMovieSentiment can then be loaded using the following command `datasets.load_dataset("turkishmoviesentiment", data_dir="<path/to/folder>")`.
|
69 |
+
"""
|
70 |
+
|
71 |
+
def _info(self):
|
72 |
+
return datasets.DatasetInfo(
|
73 |
+
description=_DESCRIPTION,
|
74 |
+
features=datasets.Features(
|
75 |
+
{
|
76 |
+
"point": datasets.Value("float32"),
|
77 |
+
"comment": datasets.Value("string"),
|
78 |
+
"film_name": datasets.Value("string"),
|
79 |
+
}
|
80 |
+
),
|
81 |
+
supervised_keys=None,
|
82 |
+
# Homepage of the dataset for documentation
|
83 |
+
homepage=_HOMEPAGE,
|
84 |
+
# License for the dataset if available
|
85 |
+
license=_LICENSE,
|
86 |
+
# Citation for the dataset
|
87 |
+
citation=_CITATION,
|
88 |
+
)
|
89 |
+
|
90 |
+
def _split_generators(self, dl_manager):
|
91 |
+
"""Returns SplitGenerators."""
|
92 |
+
path_to_manual_file = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
|
93 |
+
if not os.path.exists(path_to_manual_file):
|
94 |
+
raise FileNotFoundError(
|
95 |
+
"{} does not exist. Make sure you insert a manual dir via `datasets.load_dataset('turkishmoviesentiment', data_dir=...)` that includes a file name {}. Manual download instructions: {})".format(
|
96 |
+
path_to_manual_file, _FILENAME, self.manual_download_instructions
|
97 |
+
)
|
98 |
+
)
|
99 |
+
return [
|
100 |
+
datasets.SplitGenerator(
|
101 |
+
name=datasets.Split.TRAIN, gen_kwargs={"filepath": os.path.join(path_to_manual_file, _FILENAME)}
|
102 |
+
)
|
103 |
+
]
|
104 |
+
|
105 |
+
def _generate_examples(self, filepath):
|
106 |
+
"""Generate TurkishMovieSentiment examples."""
|
107 |
+
logging.info("⏳ Generating examples from = %s", filepath)
|
108 |
+
with open(filepath, encoding="utf-8") as f:
|
109 |
+
rdr = csv.reader(f, delimiter=",")
|
110 |
+
next(rdr)
|
111 |
+
rownum = 0
|
112 |
+
for row in rdr:
|
113 |
+
rownum += 1
|
114 |
+
yield rownum, {
|
115 |
+
"comment": row[0],
|
116 |
+
"film_name": row[1],
|
117 |
+
"point": row[2].replace(",", "."), # convert string to floating point ([0-5])
|
118 |
+
}
|