0

I'm trying to use the similar function in NLTK but it keeps returning nothing, even when i put in a word that's in the text file. Any ideas? Concordance works, but not similar.

    textList = Text(nltk.corpus.gutenberg.words(r'cleanPDF.txt'))
    textList.similar("help")

If you could point me in the right direction that would be awesome!

  • See http://www.nltk.org/book/ch01.html and https://stackoverflow.com/a/33581197/610569 – alvas Jun 17 '17 at 06:56
  • you can check https://stackoverflow.com/questions/14287993/words-generated-from-text-similar-and-contextindex-similar-words-in-nltk-sor. for more details. – Shifeng.Liu Sep 08 '17 at 04:54

0 Answers0