enlp.visualisation.word_vectors.similar_words

enlp.visualisation.word_vectors.similar_words(model, word, n=25, ax=None)[source]

Create a plot of similar words based off their word vectors

Parameters
modelgensim.model

Trained word vector model

wordstr

word to find most similar vectors, note it must be within vocabulary

nint

Number of similar words to return.

axmatplotlib.axes.Axis

Axis object for figure

Returns
figmatplotlib.figure.Figure

Figure object line plot of word counts

axmatplotlib.axes.Axis

Axis object for figure