Emojis are a wonderful method to express oneself.
This deep learning project automatically predicts emojis based on a given phrase.
In this machine learning project, we predict the emoji from the given text. This means we build a text classifier that returns an emoji that suits the given text.
Our systems should be aware of the relevant emoji to use at the proper moment.
The dataset consists of 2 parts, each is used for training and testing the deep learning model.
The training dataset contains 4 columns, one column being the text and the other contains IDs representing the emojis. Keep in mind that, here in our dataset the same sentence can have more than 1 emoji as a result.
You can download the emoji prediction dataset along with the project code in the next section.
To install the above modules, run the following command:
pip install numpy pandas tensorflow emoji
Please download the dataset & source code of the emoji prediction project (which is explained below): Emoji Prediction Python Code & Dataset
To build this text classifier, we follow the below steps:
1. Perform Exploratory Data Analysis (EDA).
2. Build the classifier model.
3. Train and evaluate the model.
Load the dataset using pandas.
import pandas as pdtrain = pd.read_csv ( ‘./Desktop/DataFlair/train_emoji.csv’ ,header=None ) test = pd.read_csv ( ‘./Desktop/DataFlair/test_emoji.csv’ ,header=None )
Now, let’s have a look at the datasets.
train.head ()
test.head ()
If you observe, there are 5 types of emojis in our dataset: heart, baseball, smile, disappointed, fork and knife.
Let’s store the above information in a dictionary for ease of use.
#deep learning tutorials #deep learning project #emoji prediction #emoji prediction python