ABSTRACT
Title: A Hybrid Machine Learning System
for Sentiment and Emotion Classification
of User Text
This project presents a hybrid machine learning system designed to
automatically analyze user-generated text and classify it based on
sentiment (positive/negative) and emotion categories (such as joy,
anger, sadness, fear, etc.). The objective of this system is to build a more
context-aware and human-like text analysis model that can understand
modern internet language, informal expressions, and emotional patterns.
The system consists of two independent models:
1. Emotion Classification Model:
This model is trained using the GoEmotions dataset, a large, human-
annotated dataset developed by Google containing 58,000 text
samples across 27 emotion classes. The model uses a fine-tuned
BERT transformer architecture, which enables high-performance
contextual understanding. BERT’s bidirectional attention mechanism
helps the system detect subtle emotional cues within short sentences.
2. Sentiment Analysis Model:
This model uses the Sentiment140 dataset, containing 1.6 million
tweets labeled as positive or negative. Text is vectorized using the TF-
IDF method, and a Logistic Regression classifier is trained for
efficient large-scale sentiment prediction. This classical approach is
computationally lightweight and extremely effective for large datasets.
To enhance modern slang handling, a custom Gen-Z Slang Dictionary is
integrated into preprocessing to correctly map slang terms (e.g., “rizz”,
“slay”, “no cap”) to their appropriate sentiment or emotion labels.
Together, both models create a robust system capable of understanding
emotional tone and sentiment polarity in real-world text inputs. The output
can be used in applications such as mental-health monitoring, social media
analytics, customer feedback interpretation, chatbots, and content
moderation.