wordnet 2.1 lexnames missing

download PyWordNet

>>> from wordnet import *

Traceback (most recent call last):
  File "<pyshell #8>", line 1, in <module>
    from wordnet import *
  File "C:\tools\python\2.6.2\lib\site-packages\wordnet.py", line 767, in </module><module>
  File "C:\tools\python\2.6.2\lib\site-packages\wordnet.py", line 763, in setupLexnames
    for l in open(WNSEARCHDIR+'/lexnames').readlines():
IOError: [Errno 2] No such file or directory: 'C:\\tools\\wordnet\\2.1\\dict/lexnames'

download WordNet-2.0.tar.gz

C:\tools\python>gzip -d WordNet-2.0.tar.gz
C:\tools\python>mkdir x
C:\tools\python>cd x
C:\tools\python\x>mv ..\WordNet-2.0.tar .
C:\tools\python\x>tar xf WordNet-2.0.tar
C:\tools\python\x\WordNet-2.0\dict>cp lexnames C:\tools\wordnet\2.1\dict

now it works

>>> from wordnet import *
>>> N['dog']
>>> V['dog']
>>> ADJ['clear']
>>> ADV['clearly']

Why lexnames is missing from wordnet 2.1 ?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s