Skip to content

najeeb-08/Spam-Email-Classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

📧 Spam Email Classifier using Naïve Bayes and NLP

This project is a Spam Email Classifier that detects spam vs. non-spam (ham) messages using Natural Language Processing (NLP) and Machine Learning (ML).

🚀 Features

  • Uses Naïve Bayes Classifier for text classification
  • Preprocesses text (removes stopwords, punctuation, and converts to lowercase)
  • Uses TF-IDF Vectorization for feature extraction
  • Achieves high accuracy (~97–99%) on the dataset

📂 Dataset

  • The dataset used is spam.csv, which contains labeled spam and ham messages.
  • Columns:
    • Category: Spam or Ham
    • Message: The actual text message

🛠️ Installation & Usage

  1. Clone the repo:
    git clone https://github.com/najeeb-08/Spam-Email-Classifier.git
    cd Spam-Email-Classifier
  2. Install dependencies:
    pip install pandas numpy sklearn nltk
  3. Run the script:
    python spam_classifier.py

📊 Model Performance

  • Accuracy: ~97–99%
  • Precision/Recall/F1-Score: High scores indicating good spam detection

📜 License

This project is open-source under the MIT License.


🔹 Contributions are welcome! Feel free to fork and improve the model.
📩 Contact: najeeb-08

About

Spam Email Classifier using Naïve Bayes and NLP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published