Newbie wordnet and pywordnet

Bengt Richter bokr at oz.net
Sat Jun 21 09:09:21 CEST 2003


On 20 Jun 2003 18:34:37 -0700, dwimansjur at hotmail.com (Dwi Sianto Mansjur) wrote:

>I am trying to use pywordnet in window environment.
>After extracting pywordnet into python folder, I am not sure how to
>include the wordnet database so that python recognize it.
>
>Running a simple example, I got the following error message.
>>>>N['dog']
>Traceback (most recent call last):
>  File "C:\Python23\o90.py", line 5, in ?
>    N['dog']
>NameError: name 'N' is not defined
>
>thanks in advance...

Suggest typing

    help('wordnet')

which will tell you to import thus:

    from wordnet import *

after which N['dog'] should work, if everything was installed ok.

If it wasn't, read INSTALL.txt and README.txt from your downloaded archive
(pywordnet-1_4.zip ?)

If that doesn't get you there, we'll have to try again ;-)

Regards,
Bengt Richter




More information about the Python-list mailing list