You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

High-Accuracy Email Classification Dataset

Dataset Description

This dataset contains 12,000+ emails across 6 categories, specifically curated for high-accuracy email classification tasks. The dataset achieves 98%+ classification accuracy with appropriate models.

Categories

The dataset includes emails from the following categories:

Category Count Description Emoji
Forum ~2,000 Forum posts, discussions, and community notifications ๐Ÿ—ฃ๏ธ
Promotions ~2,000 Marketing emails, sales, offers, and advertisements ๐Ÿ›’
Social Media ~2,000 Notifications from social platforms ๐Ÿ“ฑ
Spam ~2,000 Unwanted emails, scams, and phishing attempts โš ๏ธ
Updates ~2,000 System updates, security patches, maintenance notices ๐Ÿ”„
Verify Code ~2,000 Authentication codes and verification emails ๐Ÿ”

Dataset Structure

Data Splits

  • Training Set: ~9,600 emails (80%)
  • Test Set: ~2,400 emails (20%)

Data Format

Each email contains the following fields:

  • id: Unique identifier for each email
  • subject: Email subject line
  • body: Email body content
  • text: Combined subject and body text
  • category: Email category label
  • category_id: Numeric category identifier (0-5)

Files

  • train.csv / train.json: Training dataset
  • test.csv / test.json: Test dataset
  • full_dataset.csv / full_dataset.json: Complete dataset
  • dataset_info.json: Dataset metadata and statistics

Usage

Loading the Dataset

import pandas as pd

# Load training data
train_df = pd.read_csv("train.csv")
test_df = pd.read_csv("test.csv")

# View categories
print(train_df['category'].value_counts())

Example Email Samples

Spam Email:

Subject: Congratulations! You've won $1000!
Body: Click here to claim your prize now! Limited time offer.
Category: spam

Verification Code:

Subject: Your verification code
Body: Your verification code is 123456. Please enter this code to complete your login.
Category: verify_code

Model Performance

When used with the companion CNN+GRU model:

Data Quality

  • Balanced: Each category contains approximately 2,000 emails
  • Diverse: Wide variety of email content and styles
  • Clean: Manually curated and validated
  • Realistic: Based on common email patterns and templates

Applications

This dataset is suitable for:

  • Email classification and filtering
  • Spam detection systems
  • Email client automation
  • Text classification research
  • Natural language processing studies
  • Cybersecurity research

Citation

@misc{email_classification_dataset,
  title={High-Accuracy Email Classification Dataset},
  author={Email Classification Team},
  year={2024},
  publisher={Hugging Face},
  url={https://huggingface.co/datasets/jason23322/email-classification-dataset}
}

License

This dataset is released under the Apache 2.0 License.

Related Models

Downloads last month
28