Skip to content

This project demonstrates how to classify SMS messages as spam or ham using Natural Language Processing (NLP) and machine learning models.

Notifications You must be signed in to change notification settings

dipak0304/spam--sms-classification

Repository files navigation

Spam SMS Classification

This project demonstrates how to classify SMS messages as spam or ham using Natural Language Processing (NLP) and machine learning models.

developer

Social Media

Any suggestion and feedback is welcome. You can message me on

Instagram Facebook

Project Contents

  • Spam SMS Classication.ipynb — Jupyter Notebook covering data preprocessing, feature extraction (TF-IDF), model training and evaluation.
  • Spam SMS Collection — Dataset containing SMS messages labeled as spam or ham.
  • requirements.txt — Python dependencies required to run the notebook.

Features

  • Text preprocessing (cleaning, tokenization, stopword removal)
  • Feature extraction using Bag of Words and TF-IDF
  • Classification models (Naive Bayes, Logistic Regression, SVM)
  • Evaluation using Accuracy, Precision, Recall, and F1-score

Dataset

The dataset contains SMS messages labeled as spam or ham, useful for supervised learning in NLP.

Technology Stack

  • Python
  • scikit-learn
  • Pandas, NumPy
  • NLTK
  • Matplotlib, Seaborn

How to Run

  1. Clone or download this repository.
  2. Install the dependencies:
    pip install -r requirements.txt
  3. Launch Jupyter Notebook:
    jupyter notebook
  4. Open and run: Spam SMS Classication.ipynb.

Results

  • Models are evaluated using accuracy and F1-score.
  • Notebook includes classification metrics and confusion matrix visualizations.

Notes

This project is designed for learning and portfolio showcase. It can be extended with advanced models like LSTMs or Transformers.

About

This project demonstrates how to classify SMS messages as spam or ham using Natural Language Processing (NLP) and machine learning models.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published