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

https://github.com/senaldolage/spam-text-classifier

A simple machine learning project to classify whether a given text message is spam or not
https://github.com/senaldolage/spam-text-classifier

python scikit-learn

Last synced: about 2 months ago
JSON representation

A simple machine learning project to classify whether a given text message is spam or not

Awesome Lists containing this project

README

          

## Spam Text Classifier

A simple machine learning project to classify whether a given text message is spam or not using natural language processing and a Naive Bayes classifier.

Features:
- Classifies messages as "Spam" or "Not Spam"
- Trained using TF-IDF vectorization and Multinomial Naive Bayes
- Includes CLI prediction script

## Results

Prediction Example:

[![predict-py-python-spam-detector.png](https://i.postimg.cc/D0gmQMDS/predict-py-python-spam-detector.png)](https://postimg.cc/ZvWT4VJm)

Training and test data
(available at https://raw.githubusercontent.com/justmarkham/pycon-2016-tutorial/master/data/sms.tsv):

[![raw-githubusercontent-com-justmarkham-pycon-2016-tutorial-master-data-sms-tsv.png](https://i.postimg.cc/HW7tdkgn/raw-githubusercontent-com-justmarkham-pycon-2016-tutorial-master-data-sms-tsv.png)](https://postimg.cc/mhB9SRhW)

Model Performance:

[![model-py-python-spam-detector.png](https://i.postimg.cc/rmPPDnnk/model-py-python-spam-detector.png)](https://postimg.cc/jwyX9XYg)

## Dependencies
- pandas
- sklearn
- joblib