Datasets:
pretty_name: Kazakh Sentiment Analysis Dataset of Reviews and Attitudes
dataset_info:
- config_name: full
features:
- name: custom_id
dtype: string
- name: text
dtype: string
- name: label
dtype:
class_label:
names:
'0': 0 stars
'1': 1 star
'2': 2 stars
'3': 3 stars
'4': 4 stars
'5': 5 stars
- name: domain
dtype: string
splits:
- name: train
num_bytes: 24381051
num_examples: 180064
- config_name: polarity_classification
features:
- name: custom_id
dtype: string
- name: text
dtype: string
- name: text_cleaned
dtype: string
- name: label
dtype:
class_label:
names:
'0': negative
'1': positive
- name: domain
dtype: string
splits:
- name: train
num_bytes: 32618403
num_examples: 134368
- name: validation
num_bytes: 4085072
num_examples: 16796
- name: test
num_bytes: 4285278
num_examples: 16797
- config_name: score_classification
features:
- name: custom_id
dtype: string
- name: text
dtype: string
- name: text_cleaned
dtype: string
- name: label
dtype:
class_label:
names:
'0': 1 star
'1': 2 stars
'2': 3 stars
'3': 4 stars
'4': 5 stars
- name: domain
dtype: string
splits:
- name: train
num_bytes: 34107559
num_examples: 140126
- name: validation
num_bytes: 4318229
num_examples: 17516
- name: test
num_bytes: 4235569
num_examples: 17516
configs:
- config_name: full
data_files:
- split: train
path: full/full.csv
default: true
- config_name: polarity_classification
data_files:
- split: train
path: polarity_classification/train_pc.csv
- split: validation
path: polarity_classification/valid_pc.csv
- split: test
path: polarity_classification/test_pc.csv
- config_name: score_classification
data_files:
- split: train
path: score_classification/train_sc.csv
- split: validation
path: score_classification/valid_sc.csv
- split: test
path: score_classification/test_sc.csv
license: cc-by-4.0
task_categories:
- text-classification
task_ids:
- sentiment-classification
language:
- kk
size_categories:
- 100K<n<1M
Dataset Description
- Repository: https://github.com/IS2AI/KazSAnDRA
- Paper: https://arxiv.org/abs/2403.19335
KazSAnDRA
Kazakh Sentiment Analysis Dataset of Reviews and Attitudes, or KazSAnDRA, is a dataset developed for Kazakh sentiment analysis. KazSAnDRA comprises a collection of 180,064 reviews obtained from various sources and includes numerical ratings ranging from 1 to 5, providing a quantitative representation of customer attitudes.
In the original study, KazSAnDRA was utilised for two distinct tasks:
- polarity classification (PC), involving the prediction of whether a review is positive or negative:
- reviews with original scores of 1 or 2 were classified as negative and assigned a new score of 0,
- reviews with original scores of 4 or 5 were classified as positive and assigned a new score of 1,
- reviews with an original score of 3 were categorised as neutral and were excluded from the task.
- score classification (SC), where the objective was to predict the score of a review on a scale ranging from 1 to 5. To align with the enumeration used for labelling in the classifier, which starts from 0 rather than 1, labels 1–5 were transformed into 0–4.
KazSAnDRA consists of seven CSV files. File full.csv contains all the 180,064 reviews and ratings from 1 to 5. Files train_pc.csv, valid_pc.csv, and test_pc.csv are the training, validation, and testing sets for the polarity classification task, respectively. Files train_sc.csv, valid_sc.csv, and test_sc.csv are the training, validation, and testing sets for the score classification task, in turn.
All files, except for full.csv, include records containing a custom review identifier (custom_id), the original review text (text), the pre-processed review text (text_cleaned), the corresponding review score (label), and the domain information (domain). File full.csv includes records containing a custom review identifier (custom_id), the original review text (text), the corresponding review score (label), and the domain information (domain).
Dataset Statistics
For the sake of maintaining consistency and facilitating reproducibility of our experimental outcomes among different research groups, we partitioned KaZSAnDRA into three distinct sets: training (train), validation (valid), and testing (test) sets, following an 80/10/10 ratio.
Task | Train | Valid | Test | Total | ||||
# | % | # | % | # | % | # | % | |
PC | 134,368 | 80 | 16,796 | 10 | 16,797 | 10 | 167,961 | 100 |
SC | 140,126 | 80 | 17,516 | 10 | 17,516 | 10 | 175,158 | 100 |
The distribution of reviews across the three sets based on their domains and scores for the PC task:
Domain | Train | Valid | Test | |||
---|---|---|---|---|---|---|
# | % | # | % | # | % | |
Appstore | 101,477 | 75.52 | 12,685 | 75.52 | 12,685 | 75.52 |
Market | 22,561 | 16.79 | 2,820 | 16.79 | 2,820 | 16.79 |
Mapping | 6,509 | 4.84 | 813 | 4.84 | 814 | 4.85 |
Bookstore | 3,821 | 2.84 | 478 | 2.85 | 478 | 2.85 |
Total | 134,368 | 100 | 16,796 | 100 | 16,797 | 100 |
Score | Train | Valid | Test | |||
---|---|---|---|---|---|---|
# | % | # | % | # | % | |
1 | 110,417 | 82.18 | 13,801 | 82.17 | 13,804 | 82.18 |
0 | 23,951 | 17.82 | 2,995 | 17.83 | 2,993 | 17.82 |
Total | 134,368 | 100 | 16,796 | 100 | 16,797 | 100 |
The distribution of reviews across the three sets based on their domains and scores for the SC task:
Domain | Train | Valid | Test | |||
---|---|---|---|---|---|---|
# | % | # | % | # | % | |
Appstore | 106,058 | 75.69 | 13,258 | 75.69 | 13,257 | 75.69 |
Market | 23,278 | 16.61 | 2,909 | 16.61 | 2,910 | 16.61 |
Mapping | 6,794 | 4.85 | 849 | 4.85 | 849 | 4.85 |
Bookstore | 3,996 | 2.85 | 500 | 2.85 | 500 | 2.85 |
Total | 140,126 | 100 | 17,516 | 100 | 17,516 | 100 |
Score | Train | Valid | Test | |||
---|---|---|---|---|---|---|
# | % | # | % | # | % | |
5 | 101,302 | 72.29 | 12,663 | 72.29 | 12,663 | 72.29 |
1 | 20,031 | 14.29 | 2,504 | 14.30 | 2,504 | 14.30 |
4 | 9,115 | 6.50 | 1,140 | 6.51 | 1,139 | 6.50 |
3 | 5,758 | 4.11 | 719 | 4.10 | 720 | 4.11 |
2 | 3,920 | 2.80 | 490 | 2.80 | 490 | 2.80 |
Total | 140,126 | 100 | 17,516 | 100 | 17,517 | 100 |
How to Use
To load the subsets of KazSAnDRA separately:
from datasets import load_dataset
full = load_dataset("issai/kazsandra", "full")
pc = load_dataset("issai/kazsandra", "polarity_classification")
sc = load_dataset("issai/kazsandra", "score_classification")