This project demonstrates the use of a Bidirectional Long Short-Term Memory (BiLSTM) model for emotion detection from text. The goal is to classify text based on emotions such as happy, sad, angry, surprised, fearful, disgusted, and neutral.
The model is trained on a synthetic dataset and achieves a Test Accuracy of 97.66%.
- 
Emotion Detection Project Report: emotion_detection_project_report.pdf- A detailed report describing the project, methodologies used, and results.
 
- 
Dataset: large_synthetic_emotion_with_neutral.csv- A synthetic dataset containing text and corresponding emotions.
 
- 
Jupyter Notebook: emotion_detection_project.ipynb- The notebook used for data preprocessing, model building, training, evaluation, and predictions.
 
- NumPy: For numerical operations.
- Pandas: For data manipulation and handling the dataset.
- Seaborn: For visualizations (e.g., confusion matrix).
- NeatText: For text preprocessing such as stopword removal and special character removal.
- Scikit-learn: For data splitting (train-test split) and label encoding.
- TensorFlow/Keras: For building and training the BiLSTM model.
- Joblib: For saving the trained model and encoder.
- 
Data Preprocessing: - The text data was preprocessed using the NeatText library to remove stopwords and special characters and to convert the text to lowercase.
 
- 
Tokenization and Padding: - Text data was tokenized using Keras' Tokenizer. The sequences were padded using pad_sequences to ensure uniform input size.
 
- 
BiLSTM Model: - A Bidirectional LSTM model was built using Keras to classify the emotions in the text. The model includes an embedding layer, two BiLSTM layers, a dropout layer, and a dense output layer for multi-class classification.
 
- 
Model Evaluation: - The model was evaluated on a test set and achieved a Test Accuracy of 97.66%.
 
- Clone the repository:
git clone https://github.com/sahilgupta3023/emotion-detection-project.git