Giter Club home page Giter Club logo

emoji_word2vec's Introduction

Using word2vec for emojis

Training Word2Vec model for emojis using twitter data.

Data:-

We have 1 million sentences with emojis. This dataset is from twitter and you can download it from here.

Usage:-

  1. Install requirements

    pip3 install -r requirements.txt
  2. Training word2vec on our data

    python3 src.train_word2vec.py --data_path="Data/corpus.txt"
  • This will train word2vec and save trained models as word2vec.bin
  1. Create instance of prediction (In testing_emoji_model.ipynb)

    from src.prediction import Prediction
    predictor = Prediction(model_path="word2vec.bin")

    Once we have prediction instance we can use following methods.

    Methods in prediction

    1. getPrediction
    • Get only emojis for given text from top 200 most similar embeddings.
      predictor.getPrediction("cat",emoji_only=True, topn=200)
    1. get_similarity
    • How similar given two words are
      predictor.get_similarity(w1="๐Ÿ˜˜", w2="๐Ÿ˜™")
    1. get_vector_embedding
      predictor.get_vector_embedding("๐Ÿฐ")

Model:-

Pre trained model can be found here, Where woed2vec4 is final model.

Results:-

  1. Prediction

  2. Similarity:-

emoji_word2vec's People

Contributors

adishirsath avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.