The Sentiment Analyzer is a C++-based machine learning project designed to automatically classify text into six emotion categories:
π Joy π’ Sadness π Anger π¨ Fear π² Surprise π Disgust
The system analyzes both:
π Training dataset
β¨οΈ Real-time user input
π§ Machine Learning Algorithms Used This project implements and compares the following algorithms: Naive Bayes Classifier Logistic Regression
The main objective of this project is to: Compare the accuracy of different ML algorithms Evaluate performance differences Provide clear predictions for user-input sentences
Sentiment_Analyzer/
β
βββ src/ # Source files (.cpp)
βββ include/ # Header files
βββ bin/ # Compiled output
βββ dataset/ # Training data
Navigate to the project root directory:
cd Sentiment_Analyzer
Then compile using:
g++ -std=c++11 -o bin/emotion_detector src/*.cpp -I./include
After successful compilation:
./bin/emotion_detector
π Features
Text preprocessing
Feature extraction
Probability-based classification
Multi-class emotion detection
Accuracy comparison between models