-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndexError loading word2vec model from previous version #1173
Comments
To get a better sense of what's going on, could you please report the values of...
and
|
Got the same issue (since 1.0 update) on another dictionary, testing word existance works and returns true, but getting it raises the IndexError |
@mathrb Could you please report the values of |
Just looked into this issue, the problem seems to be related to loading pre-KeyedVectors models. When the numpy arrays are stored separately, the vectors are not loaded into the Not sure why this is happening, there was even a unit test specifically for testing this. Checking and fixing asap. |
Hello |
Pushed a fix for this in #1179 |
I'm seeing an issue in 1.0.0 that did not occur in 0.13.4.1. I'm simply loading the pre-trained gensim models from this site:
https://zenodo.org/record/162792
And then when I try to lookup a word it seems to be in the vocab but something weird is happening when accessing syn0. What's very strange is that model.vocab[word] returns an index which is smaller than the first access of syn0 but I still get an index error (I have to admit I did not try to track it down in the code). Here's some sample code and the exception:
It should be easy to reproduce this error by just trying any french word (e.g. 'bon') for the model on that site.
The text was updated successfully, but these errors were encountered: