{"id":15157994,"url":"https://github.com/a-solo/sms_spam_detection_using_nlp","last_synced_at":"2026-02-21T19:11:07.251Z","repository":{"id":255415510,"uuid":"849547224","full_name":"A-SOLO/SMS_Spam_Detection_using_NLP","owner":"A-SOLO","description":"A supervised deep learning project using Natural Language Processing(NLP) that classifies a given SMS as a spam/ham message. ","archived":false,"fork":false,"pushed_at":"2024-08-29T21:32:36.000Z","size":623,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T14:48:00.386Z","etag":null,"topics":["machine-learning","nlp","nltk-tokenizer","pandas","sklearn","spam-detection"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/A-SOLO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-29T19:36:43.000Z","updated_at":"2024-08-29T21:32:38.000Z","dependencies_parsed_at":"2024-08-29T21:52:01.825Z","dependency_job_id":"c0515e26-f3e9-422e-b535-4390713198e4","html_url":"https://github.com/A-SOLO/SMS_Spam_Detection_using_NLP","commit_stats":null,"previous_names":["a-solo/sms_spam_detection_using_nlp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/A-SOLO/SMS_Spam_Detection_using_NLP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/A-SOLO%2FSMS_Spam_Detection_using_NLP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/A-SOLO%2FSMS_Spam_Detection_using_NLP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/A-SOLO%2FSMS_Spam_Detection_using_NLP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/A-SOLO%2FSMS_Spam_Detection_using_NLP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/A-SOLO","download_url":"https://codeload.github.com/A-SOLO/SMS_Spam_Detection_using_NLP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/A-SOLO%2FSMS_Spam_Detection_using_NLP/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269338500,"owners_count":24400292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["machine-learning","nlp","nltk-tokenizer","pandas","sklearn","spam-detection"],"created_at":"2024-09-26T20:21:44.900Z","updated_at":"2025-10-19T04:24:45.397Z","avatar_url":"https://github.com/A-SOLO.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SMS_Spam_Detection_using_NLP\nA supervised deep learning project using Natural Language Processing(NLP) that classifies a given SMS as a spam/ham message.\n\n![spam_ham_5](https://github.com/user-attachments/assets/78297550-6ec2-4cd3-ad4c-2e50645195be)\n\n\n### Dependencies/Libraries used:\n* Pandas\n* Numpy\n* Seaborn\n* Sklearn\n* NLTK\n* Pickle\n* Streamlit\n\n### Input data:\nDataset - [https://www.kaggle.com/datasets/bagavathypriya/spam-ham-dataset](https://www.kaggle.com/datasets/bagavathypriya/spam-ham-dataset)\n\n### Building Model:\n\n* ### Imbalanced Data\n ![spam_ham_M1](https://github.com/user-attachments/assets/26bbc461-fa27-46de-ade0-6500ae798e3e)\n\n* ### Visualizing the trend of number of characters, number of words and number of sentences in a spam/ ham SMS\n ![spam_ham_M2](https://github.com/user-attachments/assets/0d707bc2-d0e7-4359-a5bf-38f6e6db78f2)\n\n* ### Plotting the trend as a Heatmap\n ![spam_ham_M3](https://github.com/user-attachments/assets/6a45fc9f-898a-4912-af99-4cc3446a06e3)\n\n* ### Most common words in a Spam Corpus\n ![spam_ham_M4](https://github.com/user-attachments/assets/34427830-51b1-4a10-ac4c-1d5c2f5c891a)\n\n* ### Performance of Various Models\n ![spam_ham_M5](https://github.com/user-attachments/assets/6f942ba8-cddf-4e79-99b8-550acbbaa3fe)\n\n\n# Results:\n* Applied NLP techniques like tokenization, lemmatization, and stop words and punctuation removal using NLTK and regex.\n* Performed feature engineering with handcrafted features such as digit count and email length.\n* Implemented various classification models, Naive Bayes, SVC, ETC to find the best performer.\n* Created an ensemble model, improving the accuracy from 97.87% to 98.25%.\n* Designed \u0026 deployed a basic UI with Streamlit for classifying new inputs as spam or ham.\n\n\n# Top Performing Model\nCombined Support Vector Classifier, Multinomial Naive Bayes and Extra Trees Classifier to build an Stacking Classifier Model( Ensemble Model) whose:\n\n* ### Accuracy: 0.9825918762088974\n* ### Precision: 0.9736842105263158\n\n# Testing Examples:\n* Example 1:![spam_ham_2](https://github.com/user-attachments/assets/8dd33e66-a2c5-46fe-ab4f-61c8d02d9f3d)\n\n\n* Example 2:![spam_ham_4](https://github.com/user-attachments/assets/1ef23986-224a-498d-9de6-248c8b4e59ad)\n\n\n* Example 3:![spam_ham_3](https://github.com/user-attachments/assets/642a163a-3892-4e5c-a237-48d8581c5df4)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-solo%2Fsms_spam_detection_using_nlp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa-solo%2Fsms_spam_detection_using_nlp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-solo%2Fsms_spam_detection_using_nlp/lists"}