Spam Filter AI
Table of Content
Meet Spam Filter AI, your new secret weapon against annoying spam emails. Think of it like a smart bouncer for your inbox (The Nightclub of your work), only letting in the good stuff and keeping all the junk out.
Built with Python and powered by some seriously smart machine learning magic, this app is designed to keep your email clean, simple, and distraction-free. It uses Natural Language Processing (NLP) to actually understand what an email is saying, kind of like how you'd read and judge if something sounds sketchy or not.
It also uses a technique called Naive Bayes Classification , which helps it make quick, accurate decisions on whether an email is spam or legit. And to make all that text into something the computer can work with? That’s where TF-IDF Vectorization comes in, turning words into numbers so the AI can learn and grow smarter over time.
Why You’ll Love Spam Filter AI:
Super Smart, Super Fast
It learns from thousands of emails and gets better every time. No more guessing games, just fast, accurate spam detection.
Less Clutter, More Focus
Imagine an inbox without all the noise. With Spam Filter AI on guard, you’ll spend less time deleting垃圾邮件 and more time focusing on what matters.
Built to Grow With You
As spammers get sneakier, this tool adapts. Retrain it, tweak it, make it yours, it's open-source, so the possibilities are endless.
Privacy First
No creepy data harvesting. You control everything. Your emails stay your business.
Easy to Use & Customize
Whether you're a total beginner or a coding pro, Spam Filter AI is built to be simple and flexible. Want to add new filters or train it with your own spam examples? Go ahead!
Key Features
- Direct Email Pasting: Users can paste email content directly into the application.
- Real-Time Classification: Provides instant classification of email content.
- Modern GUI: Intuitive interface for ease of use.
- Cross-Platform Compatibility: Works on Windows, macOS, and Linux.
Technologies Used
- Python: Main programming language.
- scikit-learn: For machine learning algorithms and preprocessing.
- tkinter: For creating the graphical user interface.
- pandas: For data manipulation and analysis.
- NLTK: For text processing and NLP.
📥 Installation Guide
Prerequisites
- Python: Version 3.7 or higher. Download from the official Python website.
- Git: For cloning the repository. Download from the official Git website.
Setup Instructions
- Create and Activate a Virtual Environment
Install Required Packages
pip install -r requirements.txt
macOS/Linux:
python3 -m venv venv
source venv/bin/activate
Windows:
python -m venv venv
.\venv\Scripts\activate
Navigate to the Project Directory
cd spam-filter-ai
Clone the Repository
git clone https://github.com/sd338/spam-filter-ai.git
Usage Instructions
Running the Application
macOS/Linux:
python3 src/gui.py
Windows:
python src/gui.py
How to Use
- Paste Email Content: Copy and paste email content into the text area in the GUI.
- Submit Email: Click "Submit Email" to classify the content.
- Delete Mail: Click "Delete Mail" to clear the text area.
Data Files
- Place your raw email data files (e.g.,
email.csv
,emails.csv
) in thedata/
directory. - The preprocessed data file (
preprocessed_emails.csv
) should also be placed in thedata/
directory after preprocessing.
📊 Data
Datasets are sourced from Kaggle. To obtain:
- Visit Kaggle: Go to Kaggle Datasets.
- Search for Spam Datasets: Use keywords like "spam email dataset."
- Download and Place in
data/
Directory: Save the datasets here.
Example Datasets: