pythonnltknltk-book

How to find NLTK missing resource?


I am new to python programming and my objective is to learn to use nltk book collection. But unfortunately I am unable to use any functions and it shows a lookup error with a suggestion to use the function nltk.download('genesis'). But I couldn't find any resource named genesis from the download manager. Here is the screenshot of the error shown

also enter image description here


Solution

  • Alternatively you can head to nltk corpora page and download whatever you need. Just make sure you download and unpack (if needed) it to one of the folders where nltk looks for. Or you could add the path like so

    import nltk.data
    nltk.data.path.append(custom_path)