help with noload

13 views
Skip to first unread message

Silly Kirby

unread,
Jul 4, 2009, 1:02:47 PM7/4/09
to wn-perl, Silly...@gmail.com
All, I am stuck, and I hope someone here can glance at my problem and
tell me what I am doing wrong. I would appreciate
it.

The following code:
#!/usr/bin/perl -w
use WordNet::QueryData;
my $wn = WordNet::QueryData->new(noload=>1);
print "Synset: ", join(", ", $wn->querySense("cat#n#7", "syns")),
"\n";

produces the following error:
silly@wrentit:~/practice/querydataPractice$ qd.pl
Dir = noload
Verbose = 1
Loading WordNet data...
(loadExclusions) at /usr/share/perl5/WordNet/QueryData.pm line 310.
Not able to open noload/noun.exc or noload\noun.exc: No such file or
directory at /usr/share/perl5/WordNet/QueryData.pm line 319.

But it runs fine without the noload hash argument:
silly@wrentit:~/practice/querydataPractice$ qd.pl
Synset: big_cat#n#1, cat#n#7

My OS is Kubuntu Jaunty Jackalope
My Perl is: This is perl, v5.10.0 built for x86_64-linux-gnu-thread-
multi
printevn shows WNHOME=/usr/local/WordNet-3.0/
Plus it works without the noload hash, but I need the noload for my
project.

I installed QueryData like so:
silly@wrentit:~/practice/querydataPractice$ sudo perl -MCPAN -e
'install WordNet::QueryData'
and got:
WordNet::QueryData is up to date (1.47).

It seems like it is reading the hash argument as a regular argument in
which the Dir variable is assigned the first string. Is there some
package I need to make the constructor accept hashes as arguments?

I bet there is some very basic thing I don't know. Can anyone point me
in the right direction? thanks, Silly

Danny Brian

unread,
Jul 4, 2009, 9:59:57 PM7/4/09
to wn-...@googlegroups.com
The newest version of QueryData is 1.48 per the distribution, but the $VERSION in QueryData.pm appears to read 1.47. I'd guess that CPAN.pm is not upgrading your installation properly because of that. Try downloading it from CPAN directly and installing.

Silly Kirby

unread,
Jul 5, 2009, 12:39:45 AM7/5/09
to wn-...@googlegroups.com
Thanks Danny, I did as you suggested and all works properly now. I guess I got confused cuz http://search.cpan.org/dist/WordNet-QueryData/QueryData.pm shows version 1.47 at the top of the page and the synopsis shows the use of noload.

If i was a good girl, which i am not, i would try to figure out why CPAN is passing out 1.47 as the good version through perl -MCPAN -e 'install WordNet::QueryData'. But as it is, I am happy it works properly now and i will go forth without concern. Silly

Danny Brian

unread,
Jul 5, 2009, 1:01:15 AM7/5/09
to wn-...@googlegroups.com
It's because the module has the wrong version number. Jason needs to fix it.

Jason Rennie

unread,
Jul 7, 2009, 10:59:04 AM7/7/09
to wn-...@googlegroups.com
It is fixed, but CPAN doesn't allow updates without a file name change.  The link from the csail page is the authoritative source.  I upload to CPAN mainly for the formatted man page.

Cheers,

Jason
--
Jason Rennie
Research Scientist, ITA Software
617-714-2645
http://www.itasoftware.com/

Reply all
Reply to author
Forward
0 new messages