I try to load word vectors from a bin file in the directory but I get an error #10078
-
I run the command in terminal in pycharm: and I get the error: do I need to change the encoding and how do I do that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Are you using the vectors listed here? http://evexdb.org/pmresources/vec-space-models/ One thing to try would be converting from the binary format to the text file format. You'll need from gensim.models.keyedvectors import KeyedVectors
model = KeyedVectors.load_word2vec_format('PubMed-and-PMC-w2v.bin', binary=True)
model.save_word2vec_format('PubMed-and-PMC-w2v.txt', binary=False) Then, try the same command, but point it at the new python -m spacy init vectors en PubMed-and-PMC-w2v.txt output/ I'm still downloading the vectors myself to see if this is indeed the solution, but I'm inferring from the docs that the
|
Beta Was this translation helpful? Give feedback.
Are you using the vectors listed here? http://evexdb.org/pmresources/vec-space-models/
One thing to try would be converting from the binary format to the text file format. You'll need
gensim
for this, according to this SO post.Then, try the same command, but point it at the new
.txt
file, like so:I'm still downloading the vectors myself to see if this is indeed the solution, but I'm inferring from the docs that the
txt
format i…