So, if you only need word-vectors, sure, just use Word2Vec. If you only need doc-vectors, use Doc2Vec in a mode that doesn't create or word-vectors (pure PV-DBOW, dm=0, dbow_words=1) or a Doc2Vec mode that also happens to create word-vectors but just choose to ignore them. If you need both from the same data, use a Doc2Vec mode that also creates word-vectors (like PV-DM dm=1 or PV-DBOW-with-interleaved-skip-gram-word-training, dm=0, dbow_words=1). If you need both but do it in two separate steps, you'll spend more time training, and the vectors won't be inherently compatible. –
gojomo
Nov 29 '18 at 12:54
from gensim.scripts.glove2word2vec import glove2word2vec
glove2word2vec(glove_input_file=file, word2vec_output_file="gensim_glove_vectors.txt")
from gensim.models.keyedvectors import KeyedVectors
model = KeyedVectors.load_word2vec_format("gensim_glove_vectors.txt", binary=False)