Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
getting error 'module' object is not callable
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Freeda  
View profile  
 More options May 21 2012, 2:58 am
From: Freeda <freed...@gmail.com>
Date: Sun, 20 May 2012 23:58:25 -0700 (PDT)
Local: Mon, May 21 2012 2:58 am
Subject: getting error 'module' object is not callable
Hi,
    I am using the follwoing:

    >>>from nltk import wordnet as wn
    >>>wn.synsets('dog')
    Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'synsets'

If I use this,
    >>> wn.synset('dog')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'module' object is not callable

This I tuk it from the tutorial. How shud I proceed..?

Thanks,
Freeda


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Rudnick  
View profile   Translate to Translated (View Original)
 More options May 26 2012, 9:17 pm
From: Alex Rudnick <alex.rudn...@gmail.com>
Date: Sat, 26 May 2012 18:17:27 -0700
Local: Sat, May 26 2012 9:17 pm
Subject: Re: [nltk-users] getting error 'module' object is not callable
Hey Freeda,

Hrm, it looks like the packages have moved around a little bit. This
works for me, though:

>>> from nltk import wordnet as wn
>>> wn.wordnet.synsets("dog")

[Synset('dog.n.01'), Synset('frump.n.01'), Synset('dog.n.03'),
Synset('cad.n.01'), Synset('frank.n.02'), Synset('pawl.n.01'),
Synset('andiron.n.01'), Synset('chase.v.01')]

Could you send a link to the tutorial that you're using?

Thanks!

--
-- alexr

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Rudnick  
View profile   Translate to Translated (View Original)
 More options May 26 2012, 9:21 pm
From: Alex Rudnick <alex.rudn...@gmail.com>
Date: Sat, 26 May 2012 18:21:48 -0700
Local: Sat, May 26 2012 9:21 pm
Subject: Re: [nltk-users] getting error 'module' object is not callable
Hrm, so the examples in the book still work fine, at least for me!

http://nltk.googlecode.com/svn/trunk/doc/book/ch02.html#wordnet

On Sat, May 26, 2012 at 6:17 PM, Alex Rudnick <alex.rudn...@gmail.com> wrote:
> Hey Freeda,

> Hrm, it looks like the packages have moved around a little bit. This
> works for me, though:

>>>> from nltk import wordnet as wn
>>>> wn.wordnet.synsets("dog")
> [Synset('dog.n.01'), Synset('frump.n.01'), Synset('dog.n.03'),
> Synset('cad.n.01'), Synset('frank.n.02'), Synset('pawl.n.01'),
> Synset('andiron.n.01'), Synset('chase.v.01')]

> Could you send a link to the tutorial that you're using?

> Thanks!

--
-- alexr

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steven Bird  
View profile  
 More options May 26 2012, 11:07 pm
From: Steven Bird <stevenbi...@gmail.com>
Date: Sun, 27 May 2012 13:07:42 +1000
Local: Sat, May 26 2012 11:07 pm
Subject: Re: [nltk-users] getting error 'module' object is not callable

On May 27, 2012 11:22 AM, "Alex Rudnick" <alex.rudn...@gmail.com> wrote:

> Hrm, so the examples in the book still work fine, at least for me!

> http://nltk.googlecode.com/svn/trunk/doc/book/ch02.html#wordnet

I reorganised NLTK's top level imports, and tested things as well as I
could (we're still getting our testing process fixed up, so I might have
overlooked something).

In general, if a book example doesn't work, please check that you've got
the latest version of NLTK installed, and if the problem persists, report
it via the NLTK issue tracker, or else to this list.

Thanks,
-Steven Bird


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »