nltk.Text.similar¶
-
Text.
similar
(word, num=20)[source]¶ Distributional similarity: find other words which appear in the same contexts as the specified word; list most similar words first.
Parameters: - word (str) – The word used to seed the similarity search
- num (int) – The number of words to generate (default=20)
Seealso: ContextIndex.similar_words()