pretrained_vector_loader.py
297 Bytes
from gensim.models.word2vec import Word2Vec
import gensim.downloader as api
corpus = api.load('text8') # download the corpus and return it opened as an iterable
model = Word2Vec(corpus) # train a model from the corpus
print(model.most_similar("car"))
model.save('twitter25-tag_vectors.model')