python - Import GoogleNews-vectors-negative300.bin

python – Import GoogleNews-vectors-negative300.bin

python – Import GoogleNews-vectors-negative300.bin

The below commands work.

n

brew install wgetnnwget -c https://s3.amazonaws.com/dl4j-distribution/GoogleNews-vectors-negative300.bin.gzn

n

This downloads the GZIP compressed file that you can uncompress using:

n

gzip -d GoogleNews-vectors-negative300.bin.gzn

n

You can then use the below command to get wordVector.

n

from gensim import modelsnnw = models.KeyedVectors.load_word2vec_format(n    ../GoogleNews-vectors-negative300.bin, binary=True)n

you have to write the complete path.

n

use this path:

n

https://s3.amazonaws.com/dl4j-distribution/GoogleNews-vectors-negative300.bin.gz

python – Import GoogleNews-vectors-negative300.bin

try this –

n

import gensim.downloader as apinnwv = api.load(word2vec-google-news-300)nnvec_king = wv[king]n

n

also, visit this link : https://radimrehurek.com/gensim/auto_examples/tutorials/run_word2vec.html#sphx-glr-auto-examples-tutorials-run-word2vec-py

Related posts on python :

Leave a Reply

Your email address will not be published.