Cosine similarity between words in glove-python?

171 views
Skip to first unread message

Amir Bakarov

unread,
Apr 25, 2017, 2:23:10 AM4/25/17
to GloVe: Global Vectors for Word Representation
Did anybody worked with module `glove-python`? 

I don't understand how to calculate similarity between two words. The documentations says only about method `most_similar`, for instance:
glove.most_similar('north')
But how to compute the distance between two word vectors? And how to get these vectors? Thanks!

golshan...@gmail.com

unread,
Apr 25, 2017, 6:22:48 PM4/25/17
to GloVe: Global Vectors for Word Representation
glove.word_vectors[glove.dictionary["your-word"]] It gives the vector of "your-word" !

Amir Bakarov

unread,
Apr 26, 2017, 1:11:49 AM4/26/17
to GloVe: Global Vectors for Word Representation, golshan...@gmail.com
Thank you, that works! Can you tell please where can I find information about other available methods of glove-python? 

golshan...@gmail.com

unread,
Apr 26, 2017, 2:37:54 AM4/26/17
to GloVe: Global Vectors for Word Representation, golshan...@gmail.com
Reply all
Reply to author
Forward
0 new messages