piskvorky / gensim-data

Data repository for pretrained NLP models and NLP corpora.
https://rare-technologies.com/new-api-for-pretrained-nlp-models-and-datasets-in-gensim/
GNU Lesser General Public License v2.1
965 stars 128 forks source link

KeyError: "word '...' not in vocabulary" 20-newsgroups #41

Closed gocen closed 4 years ago

gocen commented 4 years ago

I want to use pre-trained 20-newsgroups model. My code is this: import gensim from gensim.models import Word2Vec import gensim.downloader as api corpus = api.load('20-newsgroups') model = Word2Vec(corpus) print (model.similarity("jesus", "game"))

It gives this error for any word

piskvorky commented 4 years ago

Duplicate of the (already resolved) https://github.com/RaRe-Technologies/gensim/issues/2856#issuecomment-643622686