system HF staff commited on
Commit
34dfcd0
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

.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,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ - 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 Turkish Product Reviews
23
+
24
+ ## Table of Contents
25
+ - [Dataset Description](#dataset-description)
26
+ - [Dataset Summary](#dataset-summary)
27
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
28
+ - [Languages](#languages)
29
+ - [Dataset Structure](#dataset-structure)
30
+ - [Data Instances](#data-instances)
31
+ - [Data Fields](#data-instances)
32
+ - [Data Splits](#data-instances)
33
+ - [Dataset Creation](#dataset-creation)
34
+ - [Curation Rationale](#curation-rationale)
35
+ - [Source Data](#source-data)
36
+ - [Annotations](#annotations)
37
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
38
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
39
+ - [Discussion of Social Impact and Biases](#discussion-of-social-impact-and-biases)
40
+ - [Other Known Limitations](#other-known-limitations)
41
+ - [Additional Information](#additional-information)
42
+ - [Dataset Curators](#dataset-curators)
43
+ - [Licensing Information](#licensing-information)
44
+ - [Citation Information](#citation-information)
45
+
46
+ ## Dataset Description
47
+
48
+ - **Repository:** [turkish-text-data](https://github.com/fthbrmnby/turkish-text-data)
49
+ - **Point of Contact:** [Fatih Barmanbay](https://github.com/fthbrmnby)
50
+
51
+ ### Dataset Summary
52
+
53
+ This Turkish Product Reviews Dataset contains 235.165 product reviews collected online. There are 220.284 positive, 14881 negative reviews.
54
+
55
+ ### Languages
56
+
57
+ The dataset is based on Turkish.
58
+
59
+ ## Dataset Structure
60
+
61
+ ### Data Instances
62
+
63
+ **Example 1:**
64
+
65
+ **sentence:** beklentimin altında bir ürün kaliteli değil
66
+
67
+ **sentiment:** 0 (negative)
68
+
69
+ **Example 2:**
70
+
71
+ **sentence:** fiyat ve performans olarak gayet iyi
72
+
73
+ **sentiment:** 1 (positive)
74
+
75
+
76
+ ### Data Fields
77
+
78
+ - **sentence**(string) : Contatins turkish product review
79
+ - **sentiment**(int) : 0 (negative) or 1 (positive)
80
+
81
+ ### Data Splits
82
+
83
+ It is not divided into Train set and Test set.
84
+
85
+ ## Dataset Creation
86
+
87
+ ### Curation Rationale
88
+
89
+ [More Information Needed]
90
+
91
+ ### Source Data
92
+
93
+ [More Information Needed]
94
+
95
+ #### Initial Data Collection and Normalization
96
+
97
+ [More Information Needed]
98
+
99
+ #### Who are the source language producers?
100
+
101
+ [More Information Needed]
102
+
103
+ ### Annotations
104
+
105
+ The dataset does not contain any additional annotations.
106
+
107
+ #### Annotation process
108
+
109
+ [More Information Needed]
110
+
111
+ #### Who are the annotators?
112
+
113
+ [More Information Needed]
114
+
115
+ ### Personal and Sensitive Information
116
+
117
+ [More Information Needed]
118
+
119
+ ## Considerations for Using the Data
120
+
121
+ ### Discussion of Social Impact and Biases
122
+
123
+ [More Information Needed]
124
+
125
+ ### Other Known Limitations
126
+
127
+ [More Information Needed]
128
+
129
+ ## Additional Information
130
+
131
+ ### Dataset Curators
132
+
133
+ The dataset was created by [Fatih Barmanbay](https://github.com/fthbrmnby).
134
+
135
+ ### Licensing Information
136
+
137
+ The data is under the [CC-BY-SA-4.0 License](https://github.com/fthbrmnby/turkish-text-data/blob/master/LICENCE)
138
+
139
+ ### Citation Information
140
+
141
+ [More Information Needed]
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"default": {"description": "\nTurkish Product Reviews.\nThis repository contains 235.165 product reviews collected online. There are 220.284 positive, 14881 negative reviews.\n", "citation": "", "homepage": "https://github.com/fthbrmnby/turkish-text-data", "license": "", "features": {"sentence": {"dtype": "string", "id": null, "_type": "Value"}, "sentiment": {"num_classes": 2, "names": ["negative", "positive"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "turkish_product_reviews", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 43369710, "num_examples": 235165, "dataset_name": "turkish_product_reviews"}}, "download_checksums": {"https://github.com/fthbrmnby/turkish-text-data/raw/master/reviews.tar.gz": {"num_bytes": 13184332, "checksum": "dd1013e7413cd5d2dd897ea38c067302667a942e44ecb5e3cb36dea55aeeb09f"}}, "download_size": 13184332, "post_processing_size": null, "dataset_size": 43369710, "size_in_bytes": 56554042}}
dummy/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7c28d09dc7076439e93a7a2a843171cb51096d2fb29142565a6b3782b535f501
3
+ size 1063
turkish_product_reviews.py ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Turkish Product Reviews"""
2
+
3
+ from __future__ import absolute_import, division, print_function
4
+
5
+ import logging
6
+ import os
7
+
8
+ import datasets
9
+
10
+
11
+ _CITATION = ""
12
+
13
+ _DESCRIPTION = """
14
+ Turkish Product Reviews.
15
+ This repository contains 235.165 product reviews collected online. There are 220.284 positive, 14881 negative reviews.
16
+ """
17
+
18
+ _URL = "https://github.com/fthbrmnby/turkish-text-data/raw/master/reviews.tar.gz"
19
+ _FILES_PATHS = ["reviews.pos", "reviews.neg"]
20
+
21
+ _HOMEPAGE = "https://github.com/fthbrmnby/turkish-text-data"
22
+
23
+
24
+ class TurkishProductReviews(datasets.GeneratorBasedBuilder):
25
+ VERSION = datasets.Version("1.0.0")
26
+
27
+ def _info(self):
28
+ return datasets.DatasetInfo(
29
+ description=_DESCRIPTION,
30
+ features=datasets.Features(
31
+ {
32
+ "sentence": datasets.Value("string"),
33
+ "sentiment": datasets.ClassLabel(names=["negative", "positive"]),
34
+ }
35
+ ),
36
+ citation=_CITATION,
37
+ homepage=_HOMEPAGE,
38
+ )
39
+
40
+ def _split_generators(self, dl_manager):
41
+ """Returns SplitGenerators."""
42
+ dl_paths = dl_manager.download_and_extract(_URL)
43
+ filenames = list(os.listdir(dl_paths))
44
+ return [
45
+ datasets.SplitGenerator(
46
+ name=datasets.Split.TRAIN, gen_kwargs={"filepath": dl_paths, "filenames": filenames}
47
+ ),
48
+ ]
49
+
50
+ def _generate_examples(self, filepath, filenames):
51
+ """Generate TurkishProductReviews examples."""
52
+ logging.info("⏳ Generating examples from = %s", filepath)
53
+ for f in sorted(filenames):
54
+ filename, file_extension = os.path.splitext(f)
55
+ label = "negative" if file_extension == "neg" else "positive"
56
+
57
+ file_fullpath = os.path.join(filepath, f)
58
+ with open(file_fullpath, encoding="utf-8") as f:
59
+ for idx, line in enumerate(f):
60
+ line = line.strip()
61
+ yield idx, {
62
+ "sentence": line,
63
+ "sentiment": label,
64
+ }