"enas khalil" <[EMAIL PROTECTED]> wrote:

>   i got this error :
>   Traceback (most recent call last):
>   File "F:\MSC first Chapters\28-11\firstprog1.py", line 53, in -toplevel-
>     for cond in word :cfdist[cond].inc[aa['TAG']]
> TypeError: unsubscriptable object

it means that either cfdist, cfdist[cond].inc, or aa is not a subscriptable
object (that it, some of those don't support the [] operator).

my guess is that "inc" is a method, which means that you should use ()
(call method) instead of [] (index):

    for cond in word:
        cfdist[cond].inc(aa['TAG'])

> also if you please suggest me a good refrence in how to handle different
> types of objects in python as token ,and how i can generate different
> token attributes

I have no idea what you're talking about here.  maybe you should
check with an NLTK support forum?

</F>



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to