How to build a simple spam-detection machine learning classifier? | Spam email-detection python code

 In this post, i have created a simple python based project for spam detection. For instance, if someone comments somewhere, that comment can be detected by using the following code.

Requirement:

  1. You need to download an IDE. In my case, i am using Visual Editor.
  2. You need to have Python downloaded in your computer.
Source Code:
text=input("enter the text/ comment")
spam=False
if("make a lot of money" in text):
    spam=True
elif("buy now" in text):
    spam=True
elif("click this" in text):
    spam=True
elif("subscribe this" in text):
    spam=True
else:
    spam=False
if(spam):
    print("this text is spam")



Output:

spam detection using machine learning project  spam-detection-using machine learning github  spam detection using machine learning pdf  email-spam-detection using machine learning github  spam detection machine learning python  spam email-detection project github  spam email detection project report  how to build a simple spam-detection machine learning classifier naive bayes spam filter python github  sms spam detection using python  twitter spam detection code in python  email spam detection project using machine learning  spam detection algorithm source code  spam email-detection project github  spam-detection machine learning github  email spam-detection using naive bayes github

The complete screenshot of the editor:


Comments

Popular posts from this blog

Accounting Multiple Choice Questions with answers | Download PDF for MCQs

Accounting Multiple Choice Questions with answers | Download PDF for MCQs