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.
- Host: GitHub
- URL: https://github.com/vrush9840/emotion-detection-from-tweets-using-dl
- Owner: Vrush9840
- Created: 2025-12-22T09:27:56.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-12-22T09:33:40.000Z (7 months ago)
- Last Synced: 2025-12-23T20:48:59.204Z (7 months ago)
- Topics: glove-embeddings, lstm, matplotlib, nltk, numpy, pandas, python, seaborn, shap, tensorflow
- Homepage:
- Size: 2.93 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.