Skip to content

adik993/emojify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Emojify

This repository implements simple many-to-one RNN that classifies the sentences into one of 5 classes:

  1. ❤️ :heart:
  2. :baseball:
  3. 😄 :smile:
  4. 😞 :disappointed:
  5. 🍴 :fork_and_knife:

How it works

First we use the pre-trained Glove word embedding vectors to convert each word to the 50 dimensional vector. Then we run such encoded sentences through the RNN and take the last output(many-to-one RNN) to be used for the classification. Output of the RNN is the 5 dimensional vector that we run through the cross entropy loss.

By using pre-trained word embeddings our RNN already knows what is the relation between each word what makes it easier to train the classification problem even with the small training set.

What is Glove

Glove is one of the word embedding algorithms used to convert words to N dimensional vectors. Glove in particular minimizes the loss that measures how related are two words by measuring how often they occur near each other in the text corpus.

Results

Train history

User input sentences

Your own sentence: it is incredible
it is incredible 😄
Your own sentence: food looks delicious
food looks delicious 🍴
Your own sentence: it is bad
it is bad 😞

Mislabeled examples

Sentence Predicted Actual
i love you to the stars and back 😄 ❤️
my grandmother is the love of my life 😞 ❤️
she got me a nice present 😞 😄
what you did was awesome 😞 😄
i miss you so much 😞 ❤️
will you be my valentine 😞 😄
family is all i have 😞 ❤️
you brighten my day 😞 😄
she is a bully 😄 😞
work is hard 😄 😞
i did not have breakfast 😞 🍴
i like your jacket 😄 ❤️
i love taking breaks 😄 ❤️
any suggestions for dinner 😄 🍴
i miss her 😄 ❤️
work is horrible 😄 😞

References

  1. deeplearning.ai
  2. GloVe: Global Vectors for Word Representation

Releases

No releases published

Packages

No packages published

Languages