Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

NLP Emotion Classification

A Machine Learning project for classifying text into different emotions using Natural Language Processing (NLP) techniques.

📌 Project Overview

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.

🚀 Features

  • 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

🛠️ Technologies Used

  • Python
  • Pandas
  • NumPy
  • Matplotlib
  • Seaborn
  • NLTK
  • Scikit-learn
  • Jupyter Notebook / Google Colab

📂 Dataset

The project uses a text classification dataset imported from kaggle containing two columns:

  • text – The input sentence
  • emotion – The corresponding emotion label

The dataset is loaded from train.txt using semicolon (;) as the separator.

🔄 NLP Pipeline

Raw Text
    ↓
Lowercase Conversion
    ↓
Punctuation Removal
    ↓
Number Removal
    ↓
Emoji / Non-ASCII Removal
    ↓
Stopword Removal
    ↓
Feature Extraction
    ↓
BoW / TF-IDF
    ↓
Machine Learning Model
    ↓
Emotion Prediction

About

NLP Emotion Classification — A machine learning project that uses NLP, BoW, TF-IDF, Naive Bayes, and Logistic Regression to classify emotions from text.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages