Does anyone know what problem I am having with QueryData?
Thanks,
Steve
--
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.
hope that helps
"Loading WordNet::QueryData... Couldn't open data file: /usr/local/
WordNet-3.0/dictindex.noun at /usr/local/share/perl/5.10.0/WordNet/
QueryData.pm line 653, <GEN7> line 4636."
I have manually created a directory in /usr/local/ called Wordnet-3.0
and manually copied files there. This directory was never created
automatically. Is it looking in /usr/local because i am not
specifying the correct wordnet directory? If so, how do I do this?
Ive tried:
perl-I ../WordNet-3.0 Makefile.PL
then
test
and I get the same errors
> I am getting more errors like
>
> "Loading WordNet::QueryData... Couldn't open data file: /usr/local/
> WordNet-3.0/dictindex.noun at /usr/local/share/perl/5.10.0/WordNet/
> QueryData.pm line 653, <GEN7> line 4636."
>
> I have manually created a directory in /usr/local/ called Wordnet-3.0
> and manually copied files there. This directory was never created
> automatically. Is it looking in /usr/local because i am not
> specifying the correct wordnet directory? If so, how do I do this?
Yes, that's why. See: http://wordnet.princeton.edu/wordnet/faq/#environment
(they've apparently mangled my HTML, but the answer's still relevant)
You should set the environment variables WNHOME and/or WNSEARCHDIR.
This isn't the WordNet::Similarity list, BTW, but your errors seem to
stem from a mis-installed WordNet::QueryData, so maybe it's on-topic.
> Ive tried:
>
> perl-I ../WordNet-3.0 Makefile.PL
> then
> test
>
> and I get the same errors
I'm not sure what you're trying to do there...
If you want to install Perl modules in general, and you don't have root
access, you should set up CPAN to install somewhere under your home directory.
If you have root access, use CPAN normally. (sudo perl -MCPAN -eshell)
You should set up the environment variables mentioned above before
either method. Tested on Ubuntu 9.10 via VMware:
$ sudo apt-get install wordnet libdigest-sha1-perl wordnet-sense-index
(libdigest-sha1-perl: prevents problems w/CPAN?)
(wordnet-sense-index: needed for WordNet::Similarity)
(there's actually a libwordnet-querydata-perl package, too,
-- but CPAN's more up-to-date)
(lots of packages installed)
$ export WNSEARCHDIR=/usr/share/wordnet
$ sudo env WNSEARCHDIR=$WNSEARCHDIR perl -MCPAN -eshell
cpan[1]> install WordNet::QueryData
(lots of output -- answer 'yes' if needed)
cpan[2]> install WordNet::Similarity
(lots of output -- answer 'yes' if needed)
(Tests eventually failed on my machine
-- looks like rounding error
-- next step might not be necessary)
cpan[3]> notest install WordNet::Similarity
(installs without running tests)
cpan[4]> (ctrl+D to exit)
$ perl -MWordNet::QueryData -MWordNet::Similarity -le 'print "worked"'
worked
$
--
Best,
Ben