How to Install GloVe on Windows 10?

1,040 views
Skip to first unread message

terry rankin

unread,
Feb 6, 2016, 11:05:23 AM2/6/16
to GloVe: Global Vectors for Word Representation
Would like to install and run GloVe on my Windows 10 64-bit Surface Pro with i5 processor, 8GB memory & 256GB disk. Has anyone done this? Any guidance truly appreciated! 

Thanks!
terry


yakof...@gmail.com

unread,
Apr 22, 2017, 8:14:02 AM4/22/17
to GloVe: Global Vectors for Word Representation
Hi Terry,

Have you ever figures this one out?

I would be interested in knowing how to install GloVe on windows.

Cheers!

Yakof

golshan...@gmail.com

unread,
Apr 25, 2017, 6:33:41 PM4/25/17
to GloVe: Global Vectors for Word Representation
Hi Terry,

First download the code from 'https://github.com/maciejkula/glove-python', then change the line :
libraries=["stdc++"],
in setup.py to :
libraries=[], (or maybe libraries=[""],)
then open CMD in current folder and write : python setup.py install, it will install glove-python for you.
after all, to use GloVe in python, use the guidance here :
http://textminingonline.com/getting-started-with-word2vec-and-glove-in-python

Best Regards,
Mohsen

p.monal...@gmail.com

unread,
Sep 11, 2017, 12:56:23 AM9/11/17
to GloVe: Global Vectors for Word Representation
Still not working.
failed with exit status 1181

golshan...@gmail.com

unread,
Sep 11, 2017, 9:07:37 AM9/11/17
to GloVe: Global Vectors for Word Representation
Hi again,

I suggest u to use this version of GloVe: https://github.com/hans/glove.py
You can use the following source code to get output for your dataset:

# GloVe
vocab = glove.build_vocab(sentences)
cooccur = glove.build_cooccur(vocab, sentences, window_size = window_size, min_count = min_count)
id2word = evaluate.make_id2word(vocab)
W = glove.train_glove(vocab, cooccur, vector_size = embedding_size, iterations = 5)
W = evaluate.merge_main_context(W)

In the above code 'sentences' is an iterable variable (e.g. list) in which, each index contains one sentence in string format.

Regards,

golshan...@gmail.com

unread,
Sep 11, 2017, 9:21:57 AM9/11/17
to GloVe: Global Vectors for Word Representation
P.S. to find most similar words to a given word use this code:

evaluate.most_similar(W, vocab, id2word, test_word, n = 10)

And, to get a vector related to a word, use the following code:

W[vocab[test_word][0]]




On Saturday, February 6, 2016 at 7:35:23 PM UTC+3:30, terry rankin wrote:
Reply all
Reply to author
Forward
0 new messages