You can also pass the location of the database files directly to
QueryData. To do this, pass the location to "new":
my $wn = WordNet::QueryData->new("/usr/local/wordnet/dict");
--
You received this message because you are subscribed to the Google Groups "wn-perl" group.
To post to this group, send email to wn-...@googlegroups.com.
To unsubscribe from this group, send email to wn-perl+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/wn-perl?hl=en.
Are you sure you've set _and exported_ WNSEARCHDIR?
The following worked for me under an Ubuntu 9.10 VM (with
libwordnet-querydata-perl installed from 'universe' -- still in
/usr/share/wordnet, no '/dict').
$> cd WordNet-Similarity-2.05
$> WNSEARCHDIR=/usr/share/wordnet make
...
Generating default depth files.
Loading WordNet::QueryData... done
...etc...
Equivalently:
$> export WNSEARCHDIR=/usr/share/wordnet
$> cd WordNet-Similarity-2.05
$> make
--
Best,
Ben
>> Are you sure you've set _and exported_ WNSEARCHDIR?
>
> I think so:
>
> $> tail -1 ~/.bashrc
> export WNSEARCHDIR=/usr/share/wordnet
> $> echo $WNSEARCHDIR
> /usr/share/wordnet
>
Yeah, looks right.
Do you have any other WN* variables set? WNHOME/WNSEARCHPATH? (I think
WNSEARCHPATH was just for our internal Perl lib, but I still had it set
on that VM.)
What version of WordNet::QueryData are you using? (searching for
somethin', here...)
$ perl -MWordNet::QueryData -lwe 'print $WordNet::QueryData::VERSION'
1.49
ChangeLog for 1.48 mentions some fixes for WNSEARCHDIR handling, but
it'd be surprising if you had something older than 1.49 (most recent,
and ~2 yrs old).
>> $> WNSEARCHDIR=/usr/share/wordnet make
>>
>> [...]
>>
>> $> export WNSEARCHDIR=/usr/share/wordnet
>> $> make
>
> Nope, neither worked for me. I even tried:
>
> $> perl Makefile.PL PREFIX=/usr/local WNSEARCHDIR=/usr/share/wordnet;
> make && make test
>
> (I generally run the Makefile.PL first.) It's almost as though Perl
> isn't importing the environment correctly. Could this be the case?
It shouldn't be the case that Makefile.PL's environment would matter.
The path doesn't get embedded into the library in any way.
(Another stretch:) I assume you're not using some crazy, locked-down
shell of some sort? Things like `sudo` strip environment variables that
aren't explicitly allowed. Some restricted shells have weird
limitations (though this one would seem like one that would break a lot
of things, not just this installation).
--
Best,
Ben
>> What version of WordNet::QueryData are you using? (searching for
>> somethin', here...)
>>
>> $ perl -MWordNet::QueryData -lwe 'print $WordNet::QueryData::VERSION'
>> 1.49
>>
>> ChangeLog for 1.48 mentions some fixes for WNSEARCHDIR handling, but
>> it'd be surprising if you had something older than 1.49 (most recent,
>> and ~2 yrs old).
>>
>
> $> perl -MWordNet::QueryData -lwe 'print $WordNet::QueryData::VERSION'
> 1.47
>
> That could be the problem! I've installed QueryData using the Ubuntu
> repositories, which report they are using 1.48. I had installed some
> WordNet stuff prior to learning that a lot of it lived in the
> repositories. I thought I'd gotten rid of all the old stuff prior to
> using the Ubuntu stuff -- is there a way to figure out which QueryData
> perl is using? Perhaps I've got an old version it's defaulting to...
Ha. I had the opposite problem (was using a newer version than the one
installed from the Ubuntu repos). Here's how to determine:
$ perl -MWordNet::QueryData -lwe 'print for $INC{"WordNet/QueryData.pm"}, $WordNet::QueryData::VERSION'
/usr/local/share/perl/5.10.0/WordNet/QueryData.pm
1.49
(as opposed to the repositories:)
$ perl -lwe '@INC = grep !m{/local}, @INC; require WordNet::QueryData; print for $INC{"WordNet/QueryData.pm"}, $WordNet::QueryData::VERSION'
/usr/share/perl5/WordNet/QueryData.pm
1.47
> Otherwise I'll ping the Ubuntu people and see what's going on.
Unfortunately, I still think it may be an Ubuntu issue. Using the
Ubuntu repositories version of WN::QD, I don't get the failures you're
seeing:
$ export PERL5LIB=$(perl -le 'print join ":", grep !m{/local}, @INC')
$ cd WordNet-Similarity-2.05
$ perl Makefile.PL
$ make
...
(completes successfully)
Are you sure noun.exc is there? I forgot about this issue, but the
official 3.0 "database-only" downloads don't have the exception lists
any more (since they don't change every time the DB does). Maybe Ubuntu
doesn't grab them?
--
Best,
Ben