A ML project for filtering spam and troll comments/emails.
Are you tired from people flooding your website/platform with spam and deceitful comments? Well, you are not the only one.
If you were wondering what big platforms like Youtube, Tripavisor, and others have done to solve (or at list limit)
this issue, Well, two words: Machine Learning. This project will help you train your machine to recognize potential spam messages by feeding it 16541 snippets of spam/ham messages.
Scikit-learn is required (check dependencies below) to train our Naive Bayes classifier.
Dataset: We are using the first 3 parts of the Enron spam dataset (minimize processing time).
If you would like to add even more accuracy to the model, you can add more parts to the data dir.
- Python 3.7.+
$ pip install numpy
$ pip install scikit-learn
- Clone this project
- Launch message keyword dictionary/features generations
- Check whether a message is a spam by passing it as an argument to check.py. The output should be "SPAM" or "NOT SPAM"
$ git clone https://github.com/tahaHichri/ML-troll-filter.git
$ python classif.py
$ python check.py "Hey, this is an example comment"