A lightweight Python-based SMS spam detector using NLP, SVM, and Flet for spam/ham classification.
Spam-Detector classifies SMS messages as spam or ham using Natural Language Processing (NLP) for text preprocessing, a Support Vector Machine (SVM) for machine learning-based classification, and a Flet GUI for user interaction. It offers a simple interface with theme switching and a standalone executable for offline use. Key features:
- NLP: Tokenization, stemming, and stopword removal for message preprocessing.
- SVM: Accurate spam/ham classification using a trained model.
- Flet GUI: User-friendly interface for instant predictions with light/dark theme support.
- Offline support with bundled models and NLTK data.
- Error handling displayed in the GUI.
- Clone the repository:
git clone https://github.com/AliAminiCode/Spam-Detector.git cd Spam-Detector - Install dependencies:
pip install -r requirements.txt
- Download NLTK data:
python -c "import nltk; nltk.download('stopwords'); nltk.download('punkt_tab')"
Run the GUI:
python src/spam_detector_app.pyEnter a message (e.g., "Win a free iPhone!" for spam) to see predictions.
To train the model:
python src/train_spam_classifier.pyCheck out Spam-Detector in action:
Try the standalone executable, which runs completely offline without needing an internet connection: exe-v1.0 release:
Found a bug? Report it at https://github.com/AliAminiCode/Spam-Detector/issues.
Developed by Ali Amini.
Licensed under the MIT License.

