---
language: en
license: mit
tags:
- text-classification
- spam-detection
- content-moderation
- small-model
- tanaos
---
# tanaos-spam-detection-v1: A small but performant base Spam Detection model
This model was created by Tanaos with the [Artifex Python library](https://github.com/tanaos/artifex).
This is a **spam detection model** trained to classify English text as ***spam*** or ***not_spam***. It is intended to be used as a first-layer spam filter for email systems, messaging applications or any other text-based communication platform.
The following categories are considered spam:
1. Unsolicited commercial advertisement or non-commercial proselytizing.
2. Fraudulent schemes. including get-rich-quick and pyramid schemes.
3. Phishing attempts. unrealistic offers or announcements.
4. Content with deceptive or misleading information.
5. Malware or harmful links.
6. Adult content or explicit material.
7. Excessive use of capitalization or punctuation to grab attention.
## Languages
The main model language is English, but we have spam detection models specialized in other languages as well:
- Spanish: [https://huggingface.co/tanaos/tanaos-spam-detection-spanish](https://huggingface.co/tanaos/tanaos-spam-detection-spanish)
- German: [https://huggingface.co/tanaos/tanaos-spam-detection-german](https://huggingface.co/tanaos/tanaos-spam-detection-german)
- Italian: [https://huggingface.co/tanaos/tanaos-spam-detection-italian](https://huggingface.co/tanaos/tanaos-spam-detection-italian)
## How to Use
Use this model through the [Artifex library](https://github.com/tanaos/artifex):
install Artifex with
```bash
pip install artifex
```
use the model with
```python
from artifex import Artifex
spam_detection = Artifex().spam_detection()
print(spam_detection("You won an IPhone 16! Click here to claim your prize."))
# >>> [{'label': 'spam', 'score': 0.9989}]
```
## Model Description
- **Base model:** `distilbert/distilbert-base-multilingual-cased`
- **Task:** Text classification (spam detection)
- **Languages:** English; for other languages, see:
- Spanish: [tanaos-spam-detection-spanish](https://huggingface.co/tanaos/tanaos-spam-detection-spanish)
- German: [tanaos-spam-detection-german](https://huggingface.co/tanaos/tanaos-spam-detection-german)
- Italian: [tanaos-spam-detection-italian](https://huggingface.co/tanaos/tanaos-spam-detection-italian)
- **Fine-tuning data:** A synthetic, custom dataset of spam and not spam examples.
## Training Details
This model was trained using the [Artifex Python library](https://github.com/tanaos/artifex)
```bash
pip install artifex
```
by providing the following instructions and generating 10,000 synthetic training samples:
```python
from artifex import Artifex
spam_detection = Artifex().spam_detection()
spam_detection.train(
spam_content=[
"Unsolicited commercial advertising or non-commercial proselytism",
"Fraudulent schemes, including get-rich-quick schemes and pyramid schemes",
"Phishing attempts, unrealistic offers, or misleading advertisements",
"Content with misleading or false information",
"Malware or harmful links",
"Adult content or explicit material",
"Excessive use of capital letters, punctuation marks, or emojis to attract attention",
],
language="spanish",
num_samples=10000
)
```
## Intended Uses
This model is intended to:
- Serve as a first-layer spam filter for email systems, messaging applications, or any other text-based communication platform.
- Help reduce unwanted or harmful messages by classifying text as spam or not spam.
Not intended for:
- Use in high-stakes scenarios where misclassification could lead to significant consequences without further human review.