[Tutor] Using my own corpus with NLTK

Ishan Puri ballerz4ishi at sbcglobal.net
Sat Aug 29 01:02:36 CEST 2009


Hi,
    Thanks for your response. I tried this and got to the 3rd line. However, when I type in the fourth:

>>> wordlists.fileids()

a blank comes as a result. When I try the len() function it only counts the letters in title of the 
text document IM50re.txt. How do I get it to open and analyze the text, as they have done
with the Gutenberg texts at the beginning of the chapter?

    Or more generally, how does one import a .txt document to analyze in Python? I have 
downloaded the packages to analyze my data with in Python.

        Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090828/a3f28e06/attachment.htm>


More information about the Tutor mailing list