|
|
--- |
|
|
license: apache-2.0 |
|
|
task_categories: |
|
|
- text-classification |
|
|
- token-classification |
|
|
language: |
|
|
- en |
|
|
tags: |
|
|
- twitter |
|
|
- sentiment |
|
|
- social |
|
|
- multi-class |
|
|
pretty_name: twitter-sentiment-analysis |
|
|
size_categories: |
|
|
- 10M<n<100M |
|
|
--- |
|
|
|
|
|
|
|
|
# π¦ Twitter Sentiment Analysis (bdstar/twitter-sentiment-analysis) |
|
|
|
|
|
## π§ Overview |
|
|
A **refined and merged version of Twitter text sentiment datasets**, providing a clean and well-balanced dataset for **sentiment classification** across three sentiment categories: |
|
|
**`positive`**, **`negative`**, and **`neutral`**. |
|
|
|
|
|
This dataset is split into three parts β **train**, **test**, and **validation** β each sourced from highly reputable open datasets. |
|
|
It is designed for training, evaluating, and benchmarking **NLP models** for **Twitter Sentiment Analysis** and other **social media text classification** tasks. |
|
|
|
|
|
--- |
|
|
|
|
|
## ποΈ Dataset Splits |
|
|
|
|
|
| Split | Source Dataset | Rows | File Size | Link | |
|
|
|-------|----------------|------|------------|------| |
|
|
| **Train** | Twitter Sentiment Dataset (3M labeled rows) | 3,142,209 | 361 MB | [Kaggle Dataset](https://www.kaggle.com/datasets/prkhrawsthi/twitter-sentiment-dataset-3-million-labelled-rows) | |
|
|
| **Test** | Sentiment140 Dataset | 1,600,001 | 198 MB | [Kaggle Dataset](https://www.kaggle.com/datasets/kazanova/sentiment140) | |
|
|
| **Validation** | MTEB Tweet Sentiment Extraction | 31,015 | 3.45 MB | [Hugging Face Dataset](https://huggingface.co/datasets/mteb/tweet_sentiment_extraction) | |
|
|
|
|
|
--- |
|
|
|
|
|
## π§© Column Descriptions |
|
|
|
|
|
| Column | Type | Description | |
|
|
|---------|------|-------------| |
|
|
| **ID** | Integer | Auto-incremental unique ID for each row | |
|
|
| **text** | String | Tweet text content | |
|
|
| **label** | String | Sentiment category β one of `positive`, `negative`, or `neutral` | |
|
|
|
|
|
--- |
|
|
|
|
|
## π Dataset Summary |
|
|
|
|
|
| Property | Value | |
|
|
|-----------|-------| |
|
|
| **Total Rows** | 4,773,225 | |
|
|
| **Columns** | 3 | |
|
|
| **File Formats** | JSON / Parquet / Pandas / Polars / Croissant | |
|
|
| **License** | MIT | |
|
|
| **Author** | Md Abdullah Al Mamun | |
|
|
| **Year** | 2025 | |
|
|
| **Source** | Refined version of Twitter Sentiment Dataset | |
|
|
|
|
|
--- |
|
|
|
|
|
## π Detailed Statistics |
|
|
|
|
|
### ποΈββοΈ Train Set |
|
|
**Source:** [Twitter Sentiment Dataset (3M labeled rows)](https://www.kaggle.com/datasets/prkhrawsthi/twitter-sentiment-dataset-3-million-labelled-rows) |
|
|
**File Size:** 361 MB |
|
|
**Rows:** 3,142,209 |
|
|
|
|
|
| Label | Count | Percentage | |
|
|
|--------|--------|-------------| |
|
|
| Positive | 1,571,104 | 50.0% | |
|
|
| Negative | 1,571,105 | 50.0% | |
|
|
|
|
|
--- |
|
|
|
|
|
### π§ͺ Test Set |
|
|
**Source:** [Sentiment140](https://www.kaggle.com/datasets/kazanova/sentiment140) |
|
|
**File Size:** 198 MB |
|
|
**Rows:** 1,600,001 |
|
|
|
|
|
| Label | Count | Percentage | |
|
|
|--------|--------|-------------| |
|
|
| Positive | 800,000 | 50.0% | |
|
|
| Negative | 800,001 | 50.0% | |
|
|
|
|
|
--- |
|
|
|
|
|
### π§ Validation Set |
|
|
**Source:** [MTEB β Tweet Sentiment Extraction](https://huggingface.co/datasets/mteb/tweet_sentiment_extraction) |
|
|
**File Size:** 3.45 MB |
|
|
**Rows:** 31,015 |
|
|
|
|
|
| Label | Count | Percentage | |
|
|
|--------|--------|-------------| |
|
|
| Neutral | 12,561 | 40.5% | |
|
|
| Positive | 9,676 | 31.2% | |
|
|
| Negative | 8,778 | 28.3% | |
|
|
|
|
|
--- |
|
|
|
|
|
## π‘ Usage Example (Python) |
|
|
|
|
|
```python |
|
|
from datasets import load_dataset |
|
|
|
|
|
# Load dataset from Hugging Face |
|
|
dataset = load_dataset("bdstar/twitter-sentiment-analysis") |
|
|
|
|
|
# Access splits |
|
|
train = dataset["train"] |
|
|
test = dataset["test"] |
|
|
validation = dataset["validation"] |
|
|
|
|
|
# Display sample |
|
|
print(train[0]) |
|
|
``` |
|
|
|
|
|
--- |
|
|
|
|
|
## π·οΈ Citation |
|
|
If you use this dataset in your research or application, please cite as: |
|
|
|
|
|
```bibtex |
|
|
@dataset{bdstar2025twitter, |
|
|
title = {Twitter Sentiment Analysis (Refined Dataset)}, |
|
|
author = {Md Abdullah Al Mamun}, |
|
|
year = {2025}, |
|
|
howpublished = {Hugging Face}, |
|
|
url = {https://huggingface.co/datasets/bdstar/twitter-sentiment-analysis} |
|
|
} |
|
|
``` |
|
|
|
|
|
--- |
|
|
|
|
|
## π¬ Contact |
|
|
|
|
|
For questions, improvements, or collaboration: |
|
|
**Author:** Md Abdullah Al Mamun |
|
|
π§ **Email:** mamunbd.ruet@gmail.com |
|
|
π **Website:** [TechNTuts](https://techntuts.com/) |