Menu

#1 Trouble installing under NT

v1.0_(example)
open
nobody
5
2001-09-27
2001-09-27
Anonymous
No

Cool stuff - I love python & wordnet separately, so
this should be really cool together. But I've got
some problems getting started. I'm running NT 4.0,
service pak 6a.

I downloaded & installed everything OK (I guess,
Wordnet 1.6, Python 2.0, pywordnet 1.0), but when I
tried the first line of the run I had a problem. The
doc says:

[
PyWN("pin") - Python WordNet

WordNet is available from www.cogsci.princeton.edu/~wn

Download and install the latest wordnet distrobution.
(Actually, all that is required is an up-to-date
format for the data files. PyWN is pure Python and
makes no use of the C libraries provided with wordnet.

Put each of the .py files somewhere in your python
search path.

>>> from stdwn import impl
...]

(bwt, the first paren on '(Actually' doesn't get
closed, and 'distrobution' is misspelled)

When I tried the import statement I got the following:

>>> from stdwn import impl
Traceback (innermost last):
File "<pyshell#0>", line 1, in ?
from stdwn import impl
File "d:\python20\lib\stdwn.py", line 51, in ?
indexFiles = [ open(WNHOME+'/dict/index.noun'), \ IOError: [Errno 2] No such file or
directory: 'C:\\WN16/dict/index.noun'
>>>

So I looked at the wordnet install directory and
noticed that the data files I got are named 'noun.idx'
not index.noun. Sure enough, when I renamed noun.idx
to index.noun, I got the following:

Traceback (innermost last):
File "<pyshell#0>", line 1, in ?
from stdwn import impl
File "d:\python20\lib\stdwn.py", line 51, in ?
indexFiles = [ open(WNHOME+'/dict/index.noun'), \ IOError: [Errno 2] No such file or
directory: 'C:\\WN16/dict/index.verb'

So I renamed *.idx to index.*, and also had to do the
same for the data files *.dat to data.*. Finally the
import statement worked.

However, when I tried the second line in the doc I got
the following in IDLE:

>>> from stdwn import impl
>>> synsets = impl.lookupSynsetsByForm("run")
Traceback (innermost last):
File "<pyshell#1>", line 1, in ?
synsets = impl.lookupSynsetsByForm("run")
File "d:\python20\lib\pywn.py", line 59, in
lookupSynsetsByForm
keys = self.grabKeys(word)
File "d:\python20\lib\stdwn.py", line 211, in
grabKeys
if form in formToKeys:
TypeError: 'in' or 'not in' needs sequence right
argument
>>>

I am wondering if I've somehow botched the
installation, or?

Thank you for your support.

Clueless in LA,

- Phil

Discussion


Log in to post a comment.