An implementation of a Spam Filter in Python that uses the Naive Bayes Model to classify emails as spam or ham.
The program uses a small portion of NLTK to tokenize and clean out the "noise" words that may appear across the text.
Simply run the script 'ClassifierDemo.py' once you're in the program directory:
python ClassifierDemo.py
As the results will show, the classifier has roughly 90% success in distinguishing ham and spam from hard ham mails.
You will have to uncomment the last few lines in the script Classifier.py. Then simply run the command
python SpamClassifier.py
and you should be good to go.
As always, feel free to contact me at ankarathaashish@gmail.com for suggestions for improvement or bug reports. Thank you!!