I'm trying to load the pre-trained words2vecs which I've found here (https://github.com/mmihaltz/word2vec-GoogleNews-vectors) I used the following command:
model = gensim.models.KeyedVectors.load_word2vec_format('word2vec.bin.gz', binary=False)
And it throws this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/deeplearning/anaconda3/lib/python3.6/site-
packages/gensim/models/keyedvectors.py", line 193, in
load_word2vec_format
header = utils.to_unicode(fin.readline(), encoding=encoding)
File "/home/deeplearning/anaconda3/lib/python3.6/gzip.py", line 374,
in readline
return self._buffer.readline(size)
File "/home/deeplearning/anaconda3/lib/python3.6/_compression.py",
line 68, in readinto
data = self.read(len(byte_view))
File "/home/deeplearning/anaconda3/lib/python3.6/gzip.py", line 463,
in read
if not self._read_gzip_header():
File "/home/deeplearning/anaconda3/lib/python3.6/gzip.py", line 411,
in _read_gzip_header
raise OSError('Not a gzipped file (%r)' % magic)
OSError: Not a gzipped file (b've')