Open kylemadigan opened 8 years ago
A couple of tips:
pip install glove_python
or pip install .
in the directory where you cloned the code. If you are on OSX/Windows this could be more complicated, and at the moment I haven't really got much advice to offer.-w
flag in the example might be of use https://github.com/maciejkula/glove-python/blob/master/examples/example.py#L41). I used a small dump like this to provide the example you mentioned. The pre-trained word vectors you downloaded are just that: the output of a model like this, rather than the input.Hope this helps (somewhat).
Hi , thank you for the advice. I have installed glove_python and even cython using pip cmd but for some reason the script was not able to run and this message appears "No module named corpus_cython."
Any idea what caused this issue? Thanks
Has anyone solved this problem? I will try to solve it.
Same error is coming. No module named corpus_cython. If anyone has found a way to deal with it then please let me know
I got it to work. I guess the problem was that I did not execute the 'pip install .' command in the cloned repository, instead executed the command before cloning it. Anyways got it to work by copying the contents of '/usr/local/lib/python2.7/dist-packages' (This directory containing the required modules like Cython and glove) and pasting it in the cloned repository. Say yes to all the prompts to merge the directories or replacing the files and it would work
@ankian27 It didn't work for me.
didn't work for me either. I'm on ubuntu and I installed everything possible but I still receive the same message, what could it be?
@kylemadigan I solved this issue by running commands from Development section of readme:
python setup.py cythonize
pip install -e .
After that I used command:
ipython -i -- examples/example.py -c plwiki-20171103-pages-articles.xml.bz2 -t 20 -w
for now everything is working (still :) )
I did the above. But it says no module named genism even though I installed it.
Hi there, I would like to try your example.py but I have no idea what corpus are to use/ I have just started learning python and machine learning and I am really confused. In your using guide example: ipython -i -- examples/example.py -c my_corpus.txt -t 10
I tried using the link that you have provided (http://www-nlp.stanford.edu/projects/glove) under "Download pre-trained word vectors" - I chose the Wikipedia 2014 + Gigaword 5 - (glove.6B.zip). In this glove.6B.zip file there are 4 files (glove.6B.50d , glove.6B.100d, glove.6B.200d and glove.6B.300d)
In the python command I tried running it using -i -- examples/example.py -c mycorpus.txt -t 10 where I renamed on the the file i.e. (glove.6B.50d to my corpus.txt).
I get an error message where it says : No module named corpus_cython. Did I do any of the steps wrongly?
I was wondering ,if you can provide me with the link to "my_corpus.txt" where you can get the result
In [1]: glove.most_similar('physics') Out[1]: [('biology', 0.89425889335342257), ('chemistry', 0.88913708236100086), ('quantum', 0.88859617025616333), ('mechanics', 0.88821824562025431)
Thank you.