Python's NLTK documentation
Question: Where can I found the offline documentation for NLTK? It's not in
usr/share/doc, where I mostly find docs of Python modules. And there is no
nltk-doc package that can be installed.


Answer: Okay so it definitely doesn't come with any package. However it can be built.
So first:

    
    
    sudo apt-get install python-epydoc
    

This is needed to build the documentation. Then I made this script to automate
the build process for you:

    
    
    #!/bin/bash
    
    NLTK_VERSION=$(python -c 'import nltk; print nltk.__version__')
    NLTK_URL=$(python -c 'import nltk; print nltk.__url__')
    EPYDOC_OPTS = --name=nltk --navlink="nltk ${NLTK_VERSION}"\
                  --url=${NLTK_URL} --inheritance=listed --debug
    
    # Rebuild from scratch
    [[ -e ~/python-nltk-docs ]] && rm -rf ~/python-nltk-docs
    
    mkdir ~/python-nltk-docs
    epydoc ${EPYDOC_OPTS} -o ~/python-nltk-docs /usr/share/pyshared/nltk
    

This will drop html docs into `~/python-nltk-docs` for your viewing. I
basically pulled this together from their [doc
Makefile](https://code.google.com/p/nltk/source/browse/trunk/nltk/doc/Makefile).

