gensim.models.Doc2Vec.build_vocab

Doc2Vec.build_vocab(sentences, keep_raw_vocab=False, trim_rule=None, progress_per=10000)

Build vocabulary from a sequence of sentences (can be a once-only generator stream). Each sentence must be a list of unicode strings.