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.
- Host: GitHub
- URL: https://github.com/silky-x0/spam-detector
- Owner: silky-x0
- Created: 2024-10-11T04:34:13.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-11T10:52:39.000Z (over 1 year ago)
- Last Synced: 2025-08-27T11:17:50.762Z (9 months ago)
- Topics: jupyter-notebook, nltk-python, pandas, python3, scikit-learn
- Language: Jupyter Notebook
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π§ Spam Detector π

## π 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!** β