[Tutor] NLTK

Kent Johnson kent37 at tds.net
Sat Aug 29 01:24:19 CEST 2009


On Fri, Aug 28, 2009 at 6:09 PM, Ishan Puri<ballerz4ishi at sbcglobal.net> wrote:
> 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?

Did you give the correct path to your files? How did you use len()? It
helps if you show what you tried and what result you got.

Please Reply All to reply to the list.

Kent

>         Thank you.
>
>
>
> ________________________________
> From: Kent Johnson <kent37 at tds.net>
> To: Ishan Puri <ballerz4ishi at sbcglobal.net>
> Cc: Python Tutor <tutor at python.org>
> Sent: Friday, August 28, 2009 4:49:40 AM
> Subject: Re: [Tutor] NLTK
>
> On Fri, Aug 28, 2009 at 3:14 AM, Ishan Puri<ballerz4ishi at sbcglobal.net>
> wrote:
>> Hello,
>>     I have successfully downloaded NLTK and the toy grammars. I want to
>> run
>> a few of the packages that come with NLTK on corpora that I have. How do I
>> do this? What commands would I use? The corpora are text files; should I
>> put
>> them in the Python25 folder (is that the so called same directory)?
>
> The section Loading your own Corpus in the book seems to show what you want:
> http://nltk.googlecode.com/svn/trunk/doc/book/ch02.html
>
> Kent
>


More information about the Tutor mailing list