[Tutor] Where is the error
Kent Johnson
kent37 at tds.net
Tue Oct 11 14:50:35 CEST 2005
What version of NLTK are you using? From a look at the API docs, nltk.tagger.TaggedTokenizer seems to have been removed in v1.4.
Kent
enas khalil wrote:
> hello,
>
>
> when i run the following code to Read and tokenize data from a
> tagged text as follows :
>
>
> from nltk.corpus import brown
> from nltk.tagger import TaggedTokenizer
> from nltk.tokenizer import *
> tagged_txt_str=open('corpus.txt' ).read()
> tagged_txt_token=Token(TEXT=tagged_txt_str)
> TaggedTokenizer.tokenize(tagged_txt_token)
> print tagged_txt_token
>
>
>
>
> i got the following error :
> Traceback (most recent call last):
> File "C:\My Documents\TAGGING.PY", line 3, in -toplevel-
> from nltk.tagger import TaggedTokenizer
> ImportError: cannot import name TaggedTokenizer
>
>
>
>
>
>
>
> could anyone help me
>
> thanks in advance
>
> enas
>
> ------------------------------------------------------------------------
> Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
> <http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=36035/*http://music.yahoo.com/unlimited/>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list