Natural language processing / Case study

Email Classifier
Finding structure in the inbox.

An NLP experiment comparing classical and neural classifiers, with a Streamlit interface for inspecting email categories.
Role
Individual project
Context
Model comparison & interface prototype
Tools
Python · scikit-learn · TensorFlow · Streamlit
Scope
Natural language processing
TEXT → FEATURES → CATEGORY
MODEL COMPARISON / NLP PROTOTYPE
On this page

One input, several approaches

Email classification is a useful meeting point for text processing, model selection, and interface design. This project explores that path in a notebook, then brings a trained classifier into a small Streamlit application.

The notebook compares random forests, support vector machines, and a one-dimensional convolutional neural network. TF-IDF represents the text numerically, making the transformation from raw message to model input explicit.

The handoff to an interface

The application accepts pasted email text, removes HTML and URLs, normalizes the input, and applies a saved vectorizer and neural model. It presents a predicted category with a short category explanation.

Those explanations are general descriptions of the categories. They are not per-prediction feature attributions or evidence that an email is safe.

What the experiment establishes

The useful work here is the comparison of modeling approaches and the connection between preprocessing, inference, and presentation. A production system would need independently held-out data, reproducible model artifacts, drift monitoring, and careful treatment of false positives.

Explore the source

The public repository contains the notebook and Streamlit application. For another view of uncertainty, explore Bayesian inference.