A Machine Learning project for classifying text into different emotions using Natural Language Processing (NLP) techniques.
This project uses Natural Language Processing and Machine Learning algorithms to identify the emotion expressed in a given text.
The dataset contains text samples along with their corresponding emotion labels. The text is cleaned and transformed into numerical features using Bag of Words (BoW) and TF-IDF techniques.
Different classification models are trained and evaluated to determine their performance on emotion classification.
- Text preprocessing and cleaning
- Lowercase conversion
- Punctuation removal
- Number removal
- Emoji/non-ASCII character removal
- Stopword removal
- Bag of Words (BoW)
- TF-IDF Vectorization
- Multinomial Naive Bayes
- Logistic Regression
- Model accuracy evaluation
- Python
- Pandas
- NumPy
- Matplotlib
- Seaborn
- NLTK
- Scikit-learn
- Jupyter Notebook / Google Colab
The project uses a text classification dataset imported from kaggle containing two columns:
text– The input sentenceemotion– The corresponding emotion label
The dataset is loaded from train.txt using semicolon (;) as the separator.
Raw Text
↓
Lowercase Conversion
↓
Punctuation Removal
↓
Number Removal
↓
Emoji / Non-ASCII Removal
↓
Stopword Removal
↓
Feature Extraction
↓
BoW / TF-IDF
↓
Machine Learning Model
↓
Emotion Prediction