CoolFace
Datasetpublic

guruprasath017/emotion-dataset-20-emotions

20-Emotion Text Classification Dataset A comprehensive dataset for fine-grained emotion classification containing 79,595 sentences labeled with 20 distinct emotions. Dataset Description This dataset is designed for training emotion classification models that can detect nuanced emotional states in text. Unlike basic sentiment analysis (positive/negative/neutral), this dataset provides fine-grained emotion labels that better capture the complexity of human emotions.… See the full description on the dataset page: https://huggingface.co/datasets/guruprasath017/emotion-dataset-20-emotions.

sourceHugging Facemitupdated 7mo agoView on Hugging Face
0likes19downloads
Dataset Card

20-Emotion Text Classification Dataset

A comprehensive dataset for fine-grained emotion classification containing 79,595 sentences labeled with 20 distinct emotions.

Dataset Description

This dataset is designed for training emotion classification models that can detect nuanced emotional states in text. Unlike basic sentiment analysis (positive/negative/neutral), this dataset provides fine-grained emotion labels that better capture the complexity of human emotions.

Dataset Summary

  • —Total samples: 79,595
  • —Number of emotions: 20
  • —Language: English
  • —Task: Multi-class text classification
  • —Format: CSV

Emotions Covered

The dataset includes the following 20 emotions with balanced distribution:

  1. 1.happiness (7,797 samples)
  2. 2.disgust (4,315 samples)
  3. 3.jealousy (4,081 samples)
  4. 4.surprise (4,062 samples)
  5. 5.gratitude (4,004 samples)
  6. 6.relief (3,964 samples)
  7. 7.guilt (3,961 samples)
  8. 8.anger (3,860 samples)
  9. 9.disappointment (3,832 samples)
  10. 10.embarrassment (3,788 samples)
  11. 11.anxiety (3,776 samples)
  12. 12.pride (3,772 samples)
  13. 13.hope (3,770 samples)
  14. 14.loneliness (3,751 samples)
  15. 15.excitement (3,643 samples)
  16. 16.fear (3,574 samples)
  17. 17.sadness (3,559 samples)
  18. 18.confusion (3,429 samples)
  19. 19.love (3,365 samples)
  20. 20.frustration (3,292 samples)

Dataset Structure

Data Fields

  • —sentence: The original text expressing an emotion (string)
  • —emotion: The emotion label (string, one of 20 emotions)
  • —cleaned_text: Preprocessed/cleaned version of the sentence (string)

Data Example

json
{
  "sentence": "I'm so furious with you right now.",
  "emotion": "anger",
  "cleaned_text": "i'm so furious with you right now."
}

Usage

Load with Pandas

python
import pandas as pd

# Load the dataset
df = pd.read_csv("hf://datasets/shreyaspulle98/emotion-dataset-20-emotions/emotion_dataset_v5_clean.csv")

# View emotion distribution
print(df['emotion'].value_counts())

# Example: Get all samples for a specific emotion
anger_samples = df[df['emotion'] == 'anger']

Load with HuggingFace Datasets

python
from datasets import load_dataset

# Load the dataset
dataset = load_dataset("shreyaspulle98/emotion-dataset-20-emotions")

# Access the data
print(dataset)

Train/Test Split Example

python
from sklearn.model_selection import train_test_split

# Load data
df = pd.read_csv("hf://datasets/shreyaspulle98/emotion-dataset-20-emotions/emotion_dataset_v5_clean.csv")

# Split into train/test (80/20)
train_df, test_df = train_test_split(df, test_size=0.2, stratify=df['emotion'], random_state=42)

print(f"Training samples: {len(train_df)}")
print(f"Testing samples: {len(test_df)}")

Dataset Creation

Source Data

This dataset was synthetically generated using advanced language models (DeepInfra API with various LLMs) to create diverse, natural emotional expressions for each of the 20 emotion categories.

Data Collection Process

  1. 1.Prompt Engineering: Carefully designed prompts to generate natural emotional expressions
  2. 2.Multi-Model Generation: Used multiple LLMs to ensure variety and quality
  3. 3.Quality Control: Filtered and cleaned samples to remove duplicates and low-quality text
  4. 4.Balancing: Ensured relatively balanced distribution across all 20 emotions

Preprocessing

  • —Text normalization (lowercase)
  • —Special character handling
  • —Duplicate removal
  • —Quality filtering

Use Cases

This dataset is ideal for:

  • —Emotion Classification Models: Train models to detect fine-grained emotions in text
  • —Sentiment Analysis: Go beyond positive/negative to understand nuanced emotions
  • —Mental Health Applications: Detect emotional states in user communications
  • —Customer Service: Understand customer emotions in feedback and support tickets
  • —Social Media Analysis: Analyze emotional content in posts and comments
  • —Chatbots & Virtual Assistants: Enable emotion-aware responses
  • —Content Moderation: Detect concerning emotional states in user-generated content

Limitations

  • —Synthetic Data: The dataset is synthetically generated, not collected from real human conversations
  • —English Only: Currently limited to English language
  • —Cultural Context: May not fully capture cultural variations in emotional expression
  • —Ambiguity: Some sentences may express multiple emotions, but are labeled with single emotion
  • —Modern Language: Generated with current language models, may not capture historical or evolving language use

Ethical Considerations

  • —This dataset should be used responsibly, especially in sensitive applications like mental health
  • —Emotion detection models should complement, not replace, human judgment
  • —Consider privacy implications when deploying emotion detection in user-facing applications
  • —Be aware of potential biases in synthetic data generation

Citation

If you use this dataset in your research or applications, please cite:

bibtex
@dataset{emotion_dataset_20_2025,
  author = {Shreyas Pulle},
  title = {20-Emotion Text Classification Dataset},
  year = {2025},
  publisher = {HuggingFace},
  url = {https://huggingface.co/datasets/shreyaspulle98/emotion-dataset-20-emotions}
}

License

This dataset is released under the MIT License.

Contact

For questions, issues, or suggestions:

Acknowledgments

Generated using DeepInfra API and various open-source language models.