An open API service indexing awesome lists of open source software.

https://github.com/vrush9840/emotion-detection-from-tweets-using-dl

Emotion detection from tweets using Deep Learning (LSTM & BERT) to classify emotions such as Positive, Negative, Neutral, and Irrelevant with emoji recommendations.
https://github.com/vrush9840/emotion-detection-from-tweets-using-dl

glove-embeddings lstm matplotlib nltk numpy pandas python seaborn shap tensorflow

Last synced: 3 months ago
JSON representation

Emotion detection from tweets using Deep Learning (LSTM & BERT) to classify emotions such as Positive, Negative, Neutral, and Irrelevant with emoji recommendations.

Awesome Lists containing this project

README

          

# Emotion-Detection-from-Tweets-using-DL
Emotion detection from tweets using Deep Learning (LSTM & BERT) to classify emotions such as Positive, Negative, Neutral, and Irrelevant with emoji recommendations.

## Project Overview
This project focuses on detecting emotions from tweets using **Deep Learning and NLP techniques**.
The system classifies tweets into emotional categories such as **Positive, Negative, Neutral, and Irrelevant** using LSTM and BERT models.

The goal is to analyze social media sentiment and understand emotional trends from textual data.

---

## Technologies Used
- Python
- Pandas, NumPy
- TensorFlow / Keras
- LSTM (Bidirectional)
- Attention Mechanism
- BERT (Transformers)
- GloVe Embeddings
- Scikit-learn
- Matplotlib, Seaborn
- SHAP (Explainability)
- NLTK

---

## Dataset
- Twitter Training Dataset
- Twitter Validation Dataset
Each tweet is labeled with an emotion class.

---

## Project Workflow
1. Data Loading & Cleaning
- Removed mentions, hashtags, URLs, special characters
2. Text Preprocessing
- Tokenization & Padding
3. Label Encoding
4. Model Training
- LSTM with GloVe embeddings
- Attention-based LSTM
- BERT-based classification
5. Model Evaluation
- Accuracy, Precision, Recall, F1-score
- Confusion Matrix
6. Cross Validation
- K-Fold Cross Validation
7. Data Augmentation
- Random word swapping
8. Explainability
- SHAP-based interpretation
9. Deployment Logic
- Tweet input → Emotion prediction → Emoji recommendation

---

## Results
- LSTM achieved strong performance on Twitter dataset
- BERT outperformed LSTM in contextual understanding
- Performance dropped slightly on Instagram captions (domain shift)

---

## Emoji Recommendation System
Each predicted emotion is mapped to emojis for better user engagement:
- Positive → 😄🎉😊
- Negative → 😢💔😞
- Neutral → 😐🤔😶
- Irrelevant → ❓

---

## Future Enhancements
- Multi-label emotion detection
- Real-time Twitter API integration
- Web-based dashboard
- Model optimization for deployment

---

## Author
**Mrunal Khedekar**
B.Sc. Biotechnology
Aspiring Data Analyst / Data Engineer
Skilled in Python, SQL, Power BI, Machine Learning

---

## Note
This project is created for academic and learning purposes.