Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
json
Languages:
English
Size:
10K - 100K
License:
| license: apache-2.0 | |
| task_categories: | |
| - text-classification | |
| language: | |
| - en | |
| tags: | |
| - email-classification | |
| - natural-language-processing | |
| - classification | |
| - spam-detection | |
| - text-analysis | |
| size_categories: | |
| - 10K<n<100K | |
| pretty_name: High-Accuracy Email Classification Dataset | |
| # 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 | |
| ```python | |
| 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: | |
| - **Training Accuracy**: 98.13% | |
| - **Validation Accuracy**: 98%+ | |
| - **Model Repository**: [jason23322/high-accuracy-email-classifier](https://huggingface.co/jason23322/high-accuracy-email-classifier) | |
| ## 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 | |
| ```bibtex | |
| @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 | |
| - [High-Accuracy Email Classifier](https://huggingface.co/jason23322/high-accuracy-email-classifier) - The CNN+GRU model trained on this dataset | |