This repository contains a Python notebook for performing emotion recognition on tweets using TensorFlow. The notebook includes steps for importing the data, tokenizing the tweets, preparing the data for training, building and training a Bidirectional LSTM model, evaluating the model's performance, and visualizing the results.
To run the notebook, you need to install the required libraries. You can install them via pip:
pip install nlp
pip install datasets
- Importing the Tweet Emotion dataset.
- Creating train, validation, and test sets.
- Extracting tweets and labels from the examples.
- Tokenizing the tweets.
- Checking the length of the tweets.
- Creating padded sequences.
- Creating classes to index and index to classes dictionaries.
- Converting text labels to numeric labels.
- Creating the model architecture.
- Compiling the model.
- Preparing a validation set.
- Training the model.
- Visualizing training history.
- Preparing a test set.
- A look at individual predictions on the test set.
- A look at all predictions on the test set.
To run the notebook, simply open it in a Jupyter Notebook environment or any compatible platform.
This project is licensed under the MIT License.