Skip to content

MuhammadAamirGulzar/TextClassification_ML_DL

Repository files navigation

Text Classification Workbench

Production-oriented text classification repository with two practical pipelines:

  • Spam detection from YouTube comments.
  • Multi-class email intent/topic classification on the Enron dataset.

The repository combines lightweight, inspectable baselines with notebook-based experimentation so model behavior can be audited and iterated quickly.

Why This Project

Teams that handle support messages, user-generated content, or inbound communications need reliable classification to reduce manual triage and response latency. This repository provides a reproducible foundation for that workflow.

Repository Structure

01 - Spam Detection/
	Config/
	Data/
	Preprocessing/
	Model/
	main.py
	README.md

02 - Email Classification - EnronData/
	configs/
	dataloader/
	dataset/
	model/
	notebooks/
	main.py
	README.md

Notebook_Pipeline/
template.py

Architecture

  1. Data loading
  • Deterministic local loading from repository-relative paths.
  1. Text normalization
  • Config-driven preprocessing functions for cleaning, normalization, and token-level filtering.
  1. Feature/model experimentation
  • Notebook workflows for classical ML and transformer-based modeling.
  1. Evaluation
  • Standard classification metrics and saved artifacts for comparison.

Quick Start

1) Create environment

python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r "01 - Spam Detection\requirements.txt"

2) Run spam preprocessing pipeline

python "01 - Spam Detection\main.py" --preview-rows 5

3) Run Enron dataset loader

python "02 - Email Classification - EnronData\main.py" --preview-rows 5

Dataset Notes

  • YouTube spam comment CSV files are expected under 01 - Spam Detection/Data/youtube_video_comments.
  • Enron processed dataset is expected at 02 - Email Classification - EnronData/dataset/preprocessed.csv.

Engineering Notes

  • Paths are resolved relative to the repository, not local machine absolute paths.
  • Entry points are scriptable from CLI and suitable for CI smoke checks.
  • Notebook content is preserved for experimentation and comparison runs.

Roadmap

  • Add typed training and inference modules for classical ML baselines.
  • Add tokenizer/vectorizer persistence and model versioning.
  • Add unit tests for preprocessing and dataloader contracts.

License

This repository is open source under the MIT License.

About

First Text Classification Repo using Machine learning and Deep learning

Resources

License

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors