Emojis are a wonderful method to express oneself.

This deep learning project automatically predicts emojis based on a given phrase.

About Emoji Prediction Project

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.

Emoji Prediciton Dataset

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.

Tools and Libraries:

  • Python – 3.x
  • Numpy – 1.19.2
  • Pandas – 1.2.4
  • TensorFlow – 2.4.x
  • Emoji – 1.2.0

To install the above modules, run the following command:

pip install numpy pandas tensorflow emoji

Emoji Prediction Project Code & Dataset

Please download the dataset & source code of the emoji prediction project (which is explained below): Emoji Prediction Python Code & Dataset

Steps to build Emoji Prediction model

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.

Step 1: Perform Exploratory Data Analysis (EDA)

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

Emoji Prediction using Deep Learning
2.00 GEEK