Git Product home page Git Product logo

improved-word-embeddings's Introduction

Improved-Word-Embeddings

This is a paper implementation of https://arxiv.org/pdf/1711.08609.pdf. This paper increases the accuracy of word embeddings by enriching the word embedding with its associated POS (Part of Speech) tag. (See Below):

Optional Text

However, this excludes the Lexicon2Vec conversion and follows the following steps:

   Inputs:
   S = {W1, W2,……., Wn} , Input sentence S contains n words
   PT = {T1, T2,……, Tm}, All POS tags
   Corpus = Imdb/Your corpus
   
  Output:
   IMV: Improved word vectors of corpus

The steps follow the following algorithm:

for j=1 to m do
    VTj GenerateVector ( Tj )
    Tj < Tj , VTj >
end for

for each Wi in S do
  If Wi exist in "your choice of word vector" then extract VecWi
    MVi VecWi
  endif
  
  # POS ExtractPOS ( Wi )
for k=1 to m do
 If POS=Tk then ADD VTk into MVi
 end if
end for

Usage

This gives you the option of testing it on the Imdb data and also to run it on your corpus. To run it on the imdb data:

In config.json assign use_imdb : 1

To run it on your corpus:

  In config.json assign use_imdb : 0

The model used is a very generic one. Feel free to make changes to the model as per your requirements. To change model:

 In pos_function.py change model_build

improved-word-embeddings's People

Contributors

prashantranjan09 avatar

Watchers

James Cloos 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.