Determines a SMS/mail/sentence occuring in natural language to be a spam or not
-
Install the required dependencies from requirements.txt
pip3 install -r requirements.txt
-
Download the data from Kaggle and save it in data/
kaggle datasets download -d uciml/sms-spam-collection-dataset
-
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
-
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"