nltk/nltk — pull request #5 by tingletech (2011-12-08 05:34:33+00:00)
Title: using nltk.batch_ne_chunk gives "NameError: global name 'nltk' is not defined"

I was almost ready to give up on nltk; then I hacked this file and it started working!

https://gist.github.com/322906

BRIAN-TINGLEs-MacBook-Air:scrub_sample tingle$ python example1.py
Traceback (most recent call last):
File "example1.py", line 10, in
chunked_sentences = nltk.batch_ne_chunk(tagged_sentences, binary=True)
File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/nltk-2.0.1rc2_git-py2.7.egg/nltk/chunk/__init__.py", line 185, in batch_ne_chunk
chunker = nltk.data.load(chunker_pickle)
NameError: global name 'nltk' is not defined