Extract Word Embeddings from GoogleNews-vectors-negative300.txt

402 views
Skip to first unread message

Lakshya Kumar

unread,
Aug 17, 2016, 7:46:34 AM8/17/16
to gensim
Hello,

I want to extract word embeddings of particular words from the "GoogleNews-vectors-negative300.txt" file. Can anybody help me out by telling how i can do this efficiently?


Thanks,
Lakshya

Andrey Kutuzov

unread,
Aug 17, 2016, 9:00:12 AM8/17/16
to gen...@googlegroups.com
Hi Lakshya,

In the Linux shell:
grep WORD GoogleNews-vectors-negative300.txt
> --
> You received this message because you are subscribed to the Google
> Groups "gensim" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to gensim+un...@googlegroups.com
> <mailto:gensim+un...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

--
Solve et coagula!
Andrey

Lev Konstantinovskiy

unread,
Aug 18, 2016, 8:21:02 AM8/18/16
to gensim
Hi Lakshya,

Or you can load the corresponding 'bin' file into gensim and query for a word-vector as done in this tutorial https://github.com/RaRe-Technologies/gensim/blob/develop/docs/notebooks/word2vec.ipynb

Regards
Lev

On Wednesday, August 17, 2016 at 3:00:12 PM UTC+2, Andrey Kutuzov wrote:
Hi Lakshya,

In the Linux shell:
grep WORD GoogleNews-vectors-negative300.txt

17.08.2016 13:46, Lakshya Kumar wrote:
> Hello,
>
> I want to extract word embeddings of particular words from the
> "GoogleNews-vectors-negative300.txt" file. Can anybody help me out by
> telling how i can do this efficiently?
>
>
> Thanks,
> Lakshya
>
> --
> You received this message because you are subscribed to the Google
> Groups "gensim" group.
> To unsubscribe from this group and stop receiving emails from it, send

Radim Řehůřek

unread,
Aug 18, 2016, 8:21:43 PM8/18/16
to gensim
Hmm, that tutorial is a little outdated (the blog post has been updated since).

It's not a good idea to deep the content duplicate... we should decide which one to keep, and scrap the other one. I'd probably keep the notebook, and then replace the blog post with a link to the notebook. Thoughts?

-rr
Reply all
Reply to author
Forward
0 new messages