inspirehep / magpie

Deep neural network framework for multi-label text classification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Request/Queries - Not a Issue : Building Word2Vec Model and use that in Python

rajeshkumargp opened this issue · comments

Hi Magpie Team,
I have below queries .

  1. I am trying to build Word2Vec in C,
    Can i use it Magpie since it is python based . If so, how can i load the vector from C's binary to Python's magpie Word2Vec object
  2. Can I build using fasttext and use that in Magpie ..

Please provide suggestions on this.

hey @rajeshkumargp,

We use gensim object for word2vec, which uses C under the hood to compute the vectors. If you manage to convert your vectors to this object, then Magpie will support it.

In principle, you can pass whatever as the word2vec object that can behave like a dictionary. You could build your vectors any way you want, you just need to pass them in inside a dictionary-like data structure that would conform to this code and it should fly. Watch out to get the vector dimensions right though!

Best!

Thanks @jstypka , I have tried It is performing well