Skip to content

Determines a text/e-mail/sentence in natural language to be a spam or not

License

Notifications You must be signed in to change notification settings

ambareeshravi/Spam_Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spam_Classification

Determines a SMS/mail/sentence occuring in natural language to be a spam or not

  1. Install the required dependencies from requirements.txt

    pip3 install -r requirements.txt
  2. Download the data from Kaggle and save it in data/

    kaggle datasets download -d uciml/sms-spam-collection-dataset
  3. To train the model, run the script as follows:

    python3 spam_detection.py --text "URGENT! You have won the prize of a million dollars" --train True --data_path data/spam.csv --model_type MultinomialNB
  4. To only test, run the script as follows:

    python3 spam_detection.py --model_path models/MultinomialNB.model --text "URGENT! You have won the prize of a million dollars"

About

Determines a text/e-mail/sentence in natural language to be a spam or not

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages