tanaos-spam-detection-spanish: A small but performant base spam detection model specifically designed for Spanish text
This model was created by Tanaos with the Artifex Python library.
This is a spam detection model based on distilbert-base-multilingual-cased and fine-tuned on a synthetic dataset to classify text as spam or not_spam.
This model is intended to be used as a first-layer spam filter for email systems, messaging applications or any other text-based communication platform, and it was specifically fine-tuned to perform well on Spanish text.
The following categories are considered spam:
- Unsolicited commercial advertisement or non-commercial proselytizing.
- Fraudulent schemes. including get-rich-quick and pyramid schemes.
- Phishing attempts. unrealistic offers or announcements.
- Content with deceptive or misleading information.
- Malware or harmful links.
- Adult content or explicit material.
- Excessive use of capitalization or punctuation to grab attention.
Languages
The main model language is Spanish, but we have spam detection models specialized in other languages as well:
- English: tanaos-spam-detection-v1
- German: tanaos-spam-detection-german
- Italian: tanaos-spam-detection-italian
How to Use
Use this model through the Artifex library:
install Artifex with
pip install artifex
use the model with
from artifex import Artifex
spam_detection = Artifex().spam_detection(language="spanish")
print(spam_detection("¡Has ganado un iPhone 16! Haz clic aquí para reclamar tu premio."))
# >>> [{'label': 'spam', 'score': 0.9989}]
Model Description
- Base model:
distilbert/distilbert-base-multilingual-cased - Task: Text classification (spam detection)
- Languages: Spanish; for other languages, see:
- English: tanaos-spam-detection-v1
- German: tanaos-spam-detection-german
- Italian: 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
pip install artifex
by providing the following instructions and generating 10,000 synthetic training samples:
from artifex import Artifex
spam_detection = Artifex().spam_detection()
spam_detection.train(
spam_content=[
"Publicidad comercial no solicitada o proselitismo no comercial",
"Esquemas fraudulentos, incluidos los de enriquecimiento rápido y los esquemas piramidales",
"Intentos de phishing, ofertas irreales o anuncios engañosos",
"Contenido con información engañosa o falsa",
"Malware o enlaces dañinos",
"Contenido para adultos o material explícito",
"Uso excesivo de mayúsculas, signos de puntuación o emojis para llamar la atención",
],
language="spanish",
num_samples=15000
)
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, if the text is in Spanish.
- 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.