That’s what the messages claim, but it’s not correct. After the import statement, try
dir() and you’ll see that only `text1` has been imported to your namespace. But you still have to wait for the rest of the code in the `book` module to be executed. If your goal is to speed things up, you can use the following
to match what `book.py` does internally:
import nltk
from nltk.text import Text
from nltk.corpus import gutenberg
text1 = Text(gutenberg.words(‘melville-moby_dick.txt’))
I should mention that the Text class is basically a showcase for interactive use, and is not particularly useful. My general advice is to ignore it and start directly with the
next chapter of the nltk book.
Alexis