AI & ML
Emotion Detector
Different models. One sentence.
The problem
Text emotion classification is a useful way to compare modeling choices on the same input. A small application makes the differences between model predictions inspectable.
The approach
- Normalize input with NLTK tokenization, stop-word removal, and lemmatization, then transform it into TF-IDF features.
- Run Logistic Regression, SVM, and a Keras MLP to classify sadness, joy, love, anger, fear, or surprise.
- Expose predictions through a Flask web interface and a JSON prediction API.
How it fits together
Text input
NLTK preprocessing
TF-IDF
Three classifiers
Emotion comparison
The result
An interactive model-comparison interface backed by saved vectorizer and model artifacts.
The engineering decision
The three model outputs are comparisons, not calibrated confidence estimates. This case study avoids repeating evaluation scores that were not independently reproduced.