Metadata-Version: 2.4
Name: spam-detection-system
Version: 1.0.4
Summary: A sophisticated spam detection system using Multinomial Naive Bayes classifier trained on labeled emails. The system processes text through a machine learning pipeline that converts raw text into numerical features for accurate classification.
License: MIT License
        
        Copyright (c) 2025 Niladri Das
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://web-production-4569.up.railway.app/
Project-URL: Repository, https://github.com/bniladridas/spam-detection-system
Project-URL: Documentation, https://github.com/bniladridas/spam-detection-system/blob/main/docs
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24.3
Requires-Dist: pandas>=2.0.1
Requires-Dist: scikit-learn>=1.2.2
Requires-Dist: nltk>=3.8.1
Requires-Dist: joblib>=1.2.0
Requires-Dist: flask>=2.3.2
Requires-Dist: flask-cors>=4.0.0
Requires-Dist: gunicorn>=20.1.0
Requires-Dist: werkzeug>=2.3.6
Provides-Extra: dev
Requires-Dist: pytest>=7.3.0; extra == "dev"
Requires-Dist: mypy>=1.3.0; extra == "dev"
Provides-Extra: heroku
Requires-Dist: click>=8.1.3; extra == "heroku"
Requires-Dist: itsdangerous>=2.1.2; extra == "heroku"
Requires-Dist: MarkupSafe>=2.1.2; extra == "heroku"
Dynamic: license-file

# Spam Detection System

A machine learning system that detects spam messages using Multinomial Naive Bayes classification.

## Technologies

- Python, scikit-learn, NumPy, Pandas
- Flask, Gunicorn
- HTML, CSS, JavaScript

## Installation

```bash
# Clone repository
git clone https://github.com/bniladridas/spam-detection-system.git
cd spam-detection-system

# Install dependencies
pip install -r requirements.txt
```

## Usage

### Running Locally

```bash
python app.py
```

Access the application at http://127.0.0.1:5001/

### Using Docker

```bash
docker-compose up --build
```

Access the application at http://localhost:5001/

## API

Send a POST request to `/predict`:

```json
{
  "email_text": "Your email content here"
}
```

Response:

```json
{
  "is_spam": true/false,
  "spam_probability": 0-100,
  "message": "Spam detected!" or "Not spam."
}
```

## License

MIT License

## Model Details

- Algorithm: Multinomial Naive Bayes
- Features: Text classification with CountVectorizer
- Performance: 95% accuracy on test dataset

## Project Structure

- `app.py`: Flask application
- `spam_dataset.csv`: Training dataset
- `requirements.txt`: Dependencies
- `Dockerfile`: Docker configuration
- `docker-compose.yml`: Docker Compose setup

## Documentation

For more detailed information, see the [documentation](/docs/).
