A bilingual AI system that detects spam vs. ham in both Amharic and English emails. It combines TF‑IDF, hybrid rules, and transformer embeddings for accurate classification. Designed to protect Ethiopia’s digital platforms from fraudulent communication.
# 🇪🇹 Amharic & English Spam Email Detection System (AI-Based)
An **AI-Powered Bilingual Spam Detection System** for **Amharic (Ge'ez script 🇪🇹)** and **English 🇬🇧** messages with a Live Interactive Web Demo.
---
## 🌐 Live Interactive Web Demo
Click the badge above or use this link to launch the live web demo:
👉 **
surafelasfawosen.github.io
### 🌟 Features in the Live Web App:
- **✉️ Sender View (Send Test Email):** Anyone visiting the repository can type custom messages in **Amharic 🇪🇹 or English 🇬🇧** (or select preset samples). Real-time AI preview calculates spam probability, language detection, and extracted feature tokens.
- **📥 Receiver / Mailbox View:** Switch to the Receiver view to see incoming emails automatically filtered into the **Inbox (HAM)** or **Spam Folder (SPAM)**.
---
## 📊 Dataset Overview (`merged_spam_dataset.csv`)
| label | text | language |
|-------|------|----------|
| ham | ስራውን ጨርሼ ልኬልሃለሁ፡ ተመልከተው። | Amharic |
| spam | እንኳን ደስ አለዎት! የ 5,000 ብር ሽልማት አሸንፈዋል። ለመቀበል ሊንክ ይጫኑ። | Amharic |
| spam | Crypto Trading Bot: Earn 10,000% profit daily! join now | English |
| ham | Meeting scheduled at 10:00 PM tonight. | English |
| spam | Free smartphone giveaway! Share this link with 10 friends | English |
---
## 📌 Research & Engineering Pipeline
```mermaid
flowchart LR
A[📁 Dataset] --> B[🔍 Data Loading & EDA]
B --> C[🧹 Preprocessing Amharic + English]
C --> D[⚙️ Feature Extraction TF-IDF / BoW]
D --> E[✂️ Train/Test Split 80/20]
E --> F[🤖 Model Training NB, LR, SVM]
F --> G[📊 Model Evaluation]
G --> H[🔮 Prediction & Deployment]
```
### Step 1: Data Loading & Validation
- Loads `merged_spam_dataset.csv` with automatic encoding detection.
- Validates balanced distribution across labels (`spam` vs `ham`) and languages (`Amharic` vs `English`).
### Step 2: Exploratory Data Analysis (EDA)
- Analyzes class distributions, word counts, and language crosstabs.
# …