enlp.understanding.vectors.word_vectors

enlp.understanding.vectors.word_vectors(docs, sg=0, mc=0, sz=300, wnd=5, epochs=10)[source]

Compute word vectors from corpus

Parameters
docslist

list of texts (documents)

sgint

Training algorithm: 1 for skip-gram; otherwise CBOW.

mcint

Ignores all words with total frequency lower than this.

szint

Dimensionality of the word vectors.

wndint

Maximum distance between the current and predicted word within a sentence.

epochsint

number of epochs for training

Returns
wvsgensim.model

Trained word vector model