fastText supervised learning on Gensim

893 views
Skip to first unread message

Giacomo Berardi

unread,
Oct 17, 2016, 12:55:06 PM10/17/16
to gensim
Hi, I'm developing a fastText (https://github.com/facebookresearch/fastText) implementation based on the Gensim code. I have basically modified the Word2vec class and other functions in order to train a classification model:


It is just a preliminary work but I am enjoying it and I would like to improve it. I should compare it with the original implementation, but it is already very fast and effective (just like Gensim!)
Take a look

cheers
Giacomo


Lev Konstantinovskiy

unread,
Oct 18, 2016, 12:41:28 AM10/18/16
to gensim
Hi Giacomo,

Thanks for sharing. The comparison looks great! It seems that the changes are additive or sum replaced with prod.
Would be great to have it as a LabeledWord2vec class in the main Gensim repo if you have time for a PR.

Regards
Lev

Giacomo Berardi

unread,
Oct 18, 2016, 8:13:33 AM10/18/16
to gensim
Hi Lev, yes I would have no problems to work on a PR. I have subclassed Word2vec but I think that is not the best solution for integrating fastText in Gensim, I see LabeledWord2vec more as a generalization of the standard word2vec.
I will see what I can do

Regards
Giacomo

Giacomo Berardi

unread,
Oct 19, 2016, 5:02:30 AM10/19/16
to gensim
I have opened this feature https://github.com/RaRe-Technologies/gensim/issues/960 , I am ready to work on it ;)
Reply all
Reply to author
Forward
0 new messages