Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Sub-tasks:
sentiment-classification
Languages:
Turkish
Size:
100K - 1M
License:
Update files from the datasets library (from 1.7.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.7.0
- README.md +6 -4
- turkish_product_reviews.py +2 -2
README.md
CHANGED
@@ -17,6 +17,7 @@ task_categories:
|
|
17 |
- text-classification
|
18 |
task_ids:
|
19 |
- sentiment-classification
|
|
|
20 |
---
|
21 |
|
22 |
# Dataset Card for Turkish Product Reviews
|
@@ -24,19 +25,20 @@ task_ids:
|
|
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-
|
32 |
-
- [Data Splits](#data-
|
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 |
-
- [
|
|
|
40 |
- [Other Known Limitations](#other-known-limitations)
|
41 |
- [Additional Information](#additional-information)
|
42 |
- [Dataset Curators](#dataset-curators)
|
|
|
17 |
- text-classification
|
18 |
task_ids:
|
19 |
- sentiment-classification
|
20 |
+
paperswithcode_id: null
|
21 |
---
|
22 |
|
23 |
# Dataset Card for Turkish Product Reviews
|
|
|
25 |
## Table of Contents
|
26 |
- [Dataset Description](#dataset-description)
|
27 |
- [Dataset Summary](#dataset-summary)
|
28 |
+
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
29 |
- [Languages](#languages)
|
30 |
- [Dataset Structure](#dataset-structure)
|
31 |
- [Data Instances](#data-instances)
|
32 |
+
- [Data Fields](#data-fields)
|
33 |
+
- [Data Splits](#data-splits)
|
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)
|
turkish_product_reviews.py
CHANGED
@@ -51,7 +51,7 @@ class TurkishProductReviews(datasets.GeneratorBasedBuilder):
|
|
51 |
def _generate_examples(self, filepath, filenames):
|
52 |
"""Generate TurkishProductReviews examples."""
|
53 |
logger.info("⏳ Generating examples from = %s", filepath)
|
54 |
-
for f in sorted(filenames):
|
55 |
filename, file_extension = os.path.splitext(f)
|
56 |
label = "negative" if file_extension == "neg" else "positive"
|
57 |
|
@@ -59,7 +59,7 @@ class TurkishProductReviews(datasets.GeneratorBasedBuilder):
|
|
59 |
with open(file_fullpath, encoding="utf-8") as f:
|
60 |
for idx, line in enumerate(f):
|
61 |
line = line.strip()
|
62 |
-
yield idx, {
|
63 |
"sentence": line,
|
64 |
"sentiment": label,
|
65 |
}
|
|
|
51 |
def _generate_examples(self, filepath, filenames):
|
52 |
"""Generate TurkishProductReviews examples."""
|
53 |
logger.info("⏳ Generating examples from = %s", filepath)
|
54 |
+
for file_idx, f in enumerate(sorted(filenames)):
|
55 |
filename, file_extension = os.path.splitext(f)
|
56 |
label = "negative" if file_extension == "neg" else "positive"
|
57 |
|
|
|
59 |
with open(file_fullpath, encoding="utf-8") as f:
|
60 |
for idx, line in enumerate(f):
|
61 |
line = line.strip()
|
62 |
+
yield f"{file_idx}_{idx}", {
|
63 |
"sentence": line,
|
64 |
"sentiment": label,
|
65 |
}
|