Datasets:
The dataset viewer is not available for this dataset.
Error code: ConfigNamesError
Exception: KeyError
Message: 'name'
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 67, in compute_config_names_response
config_names = get_dataset_config_names(
path=dataset,
token=hf_token,
)
File "/usr/local/lib/python3.14/site-packages/datasets/inspect.py", line 161, in get_dataset_config_names
dataset_module = dataset_module_factory(
path,
...<4 lines>...
**download_kwargs,
)
File "/usr/local/lib/python3.14/site-packages/datasets/load.py", line 1215, in dataset_module_factory
raise e1 from None
File "/usr/local/lib/python3.14/site-packages/datasets/load.py", line 1190, in dataset_module_factory
).get_module()
~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/load.py", line 622, in get_module
dataset_infos = DatasetInfosDict.from_dataset_card_data(dataset_card_data)
File "/usr/local/lib/python3.14/site-packages/datasets/info.py", line 399, in from_dataset_card_data
dataset_info = DatasetInfo._from_yaml_dict(dataset_card_data["dataset_info"])
File "/usr/local/lib/python3.14/site-packages/datasets/info.py", line 317, in _from_yaml_dict
yaml_data["features"] = Features._from_yaml_list(yaml_data["features"])
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/features/features.py", line 2164, in _from_yaml_list
return cls.from_dict(from_yaml_inner(yaml_data))
~~~~~~~~~~~~~~~^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/features/features.py", line 2159, in from_yaml_inner
names = [_feature.pop("name") for _feature in obj]
~~~~~~~~~~~~^^^^^^^^
KeyError: 'name'Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Dataset Card for Email Classification Dataset
The Email Classification Dataset contains 10,900 English emails originally published as a binary spam/not_spam dataset and extended into a multiclass text classification task as part of the MLOps course at FIB-UPC (Master's in Data Science). Emails labeled not_spam in the original dataset were automatically re-labeled into multiple categories using an LLM.
Dataset Details
Dataset Description
This dataset contains 10,900 English emails for text classification tasks. Originally a binary spam detection dataset (spam/not_spam), the not_spam emails were automatically re-labeled into multiple categories using a Large Language Model (LLM), transforming the task into multiclass text classification. The dataset is split into train (8,175 rows, 75%) and test (2,725 rows, 25%) splits. It contains three columns: text (full email body), label (multiclass label assigned via LLM), and original_label (original binary label for traceability).
- Curated by: Carles Aguilera, Alex Bueno, Joel Delgado, Berta Torrents, Diego Velilla (MLOps Course, FIB-UPC)
- Language(s) (NLP): English
- License: Apache-2.0
Dataset Sources
Uses
Direct Use
- Multiclass Email Classification: Train models to classify emails into multiple categories beyond binary spam detection.
- Binary Spam/Ham Email Classification: Use the
original_labelcolumn for traditional spam detection tasks. - Raw Text for LLM Training: The
textcolumn provides raw English email content suitable for language model pre-training or fine-tuning.
Out-of-Scope Use
- Models trained on this dataset should not be expected to generalize to real-world phishing tactics, as the spam text contains exaggerated, promotional language that may not reflect actual phishing attempts.
- Performance on non-English emails is not tested and likely to be worse.
- Not suitable for applications requiring expert-level multiclass annotation quality, as labels were LLM-generated and may contain noise compared to human expert labeling.
Dataset Structure
Dataset Instances
Each instance contains the following fields:
| Field | Type | Description |
|---|---|---|
text |
string |
Full email body as plain text |
label |
string |
Final multiclass label assigned via LLM |
original_label |
string |
Original binary label: spam or not_spam |
Dataset Splits
| Split | Rows | % |
|---|---|---|
train |
8,175 | 75% |
test |
2,725 | 25% |
| Total | 10,900 | 100% |
Dataset Creation
Curation Rationale
The dataset was originally published as a binary spam detection dataset. As part of the MLOPS course in the Master's in Data Science at FIB-UPC, the dataset was extended to support multiclass text classification by automatically re-labeling not_spam emails into multiple categories using an LLM. This transformation enables exploration of more nuanced classification tasks beyond binary spam detection.
Source Data
Data Collection and Processing
The original dataset was sourced from Deysi/spam-detection-dataset on Hugging Face, containing 10,900 English emails with binary spam/not_spam labels. The not_spam emails were then processed using an LLM to assign multiclass category labels. The original_label column was retained for traceability, preserving the original binary classification.
Who are the source data producers?
The original binary data was sourced from Deysi and published on Hugging Face. Information from the original dataset's sources is not clear.
Annotations
Annotation process
The multiclass labels derived from not_spam emails were generated automatically using a Large Language Model (LLM). The LLM was prompted to assign category labels to emails originally labeled as not_spam.
EXPLAIN HOW DID WE GENERATE THE MULTICLASS LABELS USING THE LLM
The original_label column is preserved for traceability and validation. The annotation process for the original binary labels is unkwnown.
Bias, Risks, and Limitations
- Synthetic spam style. Original spam texts contain exaggerated, promotional language that may not reflect real-world phishing tactics. Models trained on this dataset may not generalize to real-life spam.
- Temporal drift. Dataset likely reflects spam patterns from its original (and unknown) collection period. Current spam tactics may differ.
- English-only. No multilingual coverage. Performance on non-English email is not tested and likely to be worse.
- LLM annotation noise. The multiclass labels for
not_spamemails have been LLM-generated and may differ from expert annotations.
Recommendations
Users should be made aware of the risks, biases, and limitations of the dataset. Specifically, users should:
- Be cautious when applying models trained on this dataset to real-world spam detection, as the spam style may not generalize.
- Consider validating multiclass labels with human experts if high annotation quality is required.
- Be aware that temporal and linguistic biases may limit applicability to other contexts.
Citation [optional]
BibTeX:
@dataset{email_classification_2026,
author = {Carles Aguilera, Alex Bueno, Joel Delgado, Berta Torrents, Diego Velilla},
title = {Email Classification Dataset},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/datasets/Deysi/spam-detection-dataset}
}
APA:
Aguilera, C., Bueno, A., Delgado, J., Torrents, B., & Velilla, D. (2026). Email Classification Dataset. Hugging Face. https://huggingface.co/datasets/Deysi/spam-detection-dataset
Dataset Card Contact
This project has been carried out by:
- Downloads last month
- 46