An open API service indexing awesome lists of open source software.

https://github.com/silky-x0/spam-detector

An machine learning algorithm to detect spam emails or such.
https://github.com/silky-x0/spam-detector

jupyter-notebook nltk-python pandas python3 scikit-learn

Last synced: about 2 months ago
JSON representation

An machine learning algorithm to detect spam emails or such.

Awesome Lists containing this project

README

          

# πŸ“§ Spam Detector πŸ”

![Spam Detector](https://img.shields.io/badge/Spam-Detection-green?style=for-the-badge&logo=python)

## πŸš€ Overview
This project is a **Spam Detector** that classifies messages as *spam* or *ham* (not spam) using **Natural Language Processing (NLP)** techniques and **Machine Learning** models. πŸ€–

## πŸ“Œ Features
βœ… Preprocesses text data (tokenization, stopword removal, stemming) πŸ”„
βœ… Uses **TF-IDF vectorization** for feature extraction πŸ“Š
βœ… Implements **NaΓ―ve Bayes classifier** for spam detection πŸ“‘
βœ… Achieves high accuracy with **Scikit-learn** models 🎯
βœ… Supports both **Jupyter Notebook** and **Python scripts** 🐍

## πŸ› οΈ Tech Stack
- **Python** 🐍
- **NLTK** πŸ“–
- **Pandas** πŸ—οΈ
- **Scikit-learn** 🧠
- **NumPy** πŸ”’
- **Matplotlib/Seaborn** πŸ“Š

## πŸ› οΈ Installation & Setup
1️⃣ Clone the repository:
```bash
git clone https://github.com/yourusername/spam-detector.git
cd spam-detector
```
2️⃣ Install dependencies:
```bash
pip install -r requirements.txt
```
3️⃣ Run Jupyter Notebook:
```bash
jupyter notebook
```

## 🎯 Usage
To detect spam messages:
```python
from scripts.predict import predict_spam
message = "Congratulations! You've won a free iPhone!"
print(predict_spam(message)) # Output: Spam 🚨
```

## πŸ“Š Results
The model achieves an **accuracy of 95%** on the test dataset. πŸš€

## 🀝 Contributing
Contributions are welcome! Feel free to open a PR or issue. πŸ’‘

## πŸ“œ License
MIT License Β© 2025 Akhilesh tiwari. πŸ“

---
🌟 **Star this repo if you found it useful!** ⭐