Emojifier is a deep learning-based Natural Language Processing (NLP) model designed to add relevant emoji representations to text input. It utilizes word embeddings and Long Short-Term Memory (LSTM) networks to classify sentences into predefined emoji categories.
- Implements GloVe word embeddings for sentence representation.
- Uses LSTM layers for sequence modeling.
- Supports emoji classification based on textual input.
- Leverages pre-trained word embeddings to improve model accuracy.
- Employs softmax activation for classification.
Emojifier/
│── Emoji_v3a.ipynb # Jupyter Notebook containing model training and evaluation
│── utils.py # Utility functions for processing and modeling
│── emo_utils.py # Additional helper functions
│── test_utils.py # Test functions for validation
│── generateTestCases.py # Test case generation functions
│── data # Folder containing data
│── test_utils.py # Folder containing images of figures used in the notebook
Ensure you have the following Python libraries installed:
pip install numpy tensorflow emoji matplotlib
The Emojifier model follows this architecture:
- Embedding Layer - Pre-trained GloVe embeddings for word representation.
- LSTM Layer (128 units) - Captures contextual dependencies in text.
- Dropout Layer (0.5) - Reduces overfitting.
- Second LSTM Layer (128 units) - Further learns sentence patterns.
- Dropout Layer (0.5) - Ensures better generalization.
- Dense Layer (5 units) - Outputs class scores.
- Softmax Activation - Converts scores to probabilities.
The model is trained using:
- Cross-entropy loss for classification.
- Stochastic Gradient Descent (SGD) optimizer.
- One-hot encoding for labels.
- 400 iterations for optimization.
To run the model, follow these steps:
- Load the dataset and word embeddings.
- Train the model using the
model()
function. - Test the model using
predict()
. - Use
Emojify_V2()
to classify new sentences.
- Extend the emoji classification to a larger set.
- Implement attention mechanisms for better context understanding.
- Deploy as a web API for integration into messaging applications.
This project is open-source and available under the MIT License.
Author: Chirag N Vijay