Skip Menu |

This queue is for tickets about the WordNet-SenseRelate-AllWords CPAN distribution.

Report information
The Basics
Id: 34240
Status: resolved
Priority: 0/
Queue: WordNet-SenseRelate-AllWords

People
Owner: Nobody in particular
Requestors: esia168 [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.07
Fixed in: (no value)



I run the example code : use WordNet::SenseRelate::AllWords; use WordNet::QueryData; my $qd = WordNet::QueryData->new; my $wsd = WordNet::SenseRelate::AllWords->new (wordnet => $qd, measure => 'WordNet::Similarity::lesk'); my @words = qw/this is a test/; my @results = $wsd->disambiguate (context => [@words]); print join (' ', @results), "\n"; Got these error : Use of uninitialized value in right bitshift (>>) at /usr/local/share/perl/5.8.8/WordNet/SenseRelate/AllWords.pm line 525. Use of uninitialized value in subtraction (-) at /usr/local/share/perl/5.8.8/WordNet/SenseRelate/AllWords.pm line 526. My info : This is perl, v5.8.8 built for i486-linux-gnu-thread-multi Linux william-pc 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 i686 GNU/Linux
Subject: error in synopsis
Thanks for reporting this. The problem is that there is a required argument to disambiguate that isn't documented nor enforced, that's the window argument. I have modified your example to include that, and it seems to run fine now. We'll correct this in the next release, which will be coming shortly, and we'll also try to provide a few more example uses to make it easier to write programs like you are doing. use WordNet::SenseRelate::AllWords; use WordNet::QueryData; my $qd = WordNet::QueryData->new; my $wsd = WordNet::SenseRelate::AllWords->new (wordnet => $qd, measure => 'WordNet::Similarity::lesk'); my @context = qw/this is a test/; my @results = $wsd->disambiguate (window => 3, context => [@context]); print "@results"; Thanks again, this slipped through the cracks! Cordially, Ted On Wed Mar 19 12:02:32 2008, keenlearner wrote: Show quoted text
> I run the example code : > use WordNet::SenseRelate::AllWords; > use WordNet::QueryData; > my $qd = WordNet::QueryData->new; > my $wsd = WordNet::SenseRelate::AllWords->new (wordnet => $qd, > measure => > 'WordNet::Similarity::lesk'); > my @words = qw/this is a test/; > my @results = $wsd->disambiguate (context => [@words]); > print join (' ', @results), "\n"; > > Got these error : > Use of uninitialized value in right bitshift (>>) at > /usr/local/share/perl/5.8.8/WordNet/SenseRelate/AllWords.pm line 525. > Use of uninitialized value in subtraction (-) at > /usr/local/share/perl/5.8.8/WordNet/SenseRelate/AllWords.pm line 526. > > > My info : > > This is perl, v5.8.8 built for i486-linux-gnu-thread-multi > Linux william-pc 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 > i686 GNU/Linux
Subject: Re: [rt.cpan.org #34240]
Date: Thu, 20 Mar 2008 00:59:19 -0500
To: bug-WordNet-SenseRelate-AllWords [...] rt.cpan.org
From: "Ted Pedersen" <tpederse [...] d.umn.edu>
We have just released version 0.08 of WordNet-SenseRelate-AllWords that should fix this particular problem. On Wed, Mar 19, 2008 at 11:02 AM, keenlearner via RT <bug-WordNet-SenseRelate-AllWords@rt.cpan.org> wrote: Show quoted text
> > Wed Mar 19 12:02:32 2008: Request 34240 was acted upon. > Transaction: Ticket created by keenlearner > Queue: WordNet-SenseRelate-AllWords > Subject: (No subject given) > Broken in: 0.07 > Severity: Important > Owner: Nobody > Requestors: esia168@yahoo.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=34240 > > > > I run the example code : > use WordNet::SenseRelate::AllWords; > use WordNet::QueryData; > my $qd = WordNet::QueryData->new; > my $wsd = WordNet::SenseRelate::AllWords->new (wordnet => $qd, > measure => > 'WordNet::Similarity::lesk'); > my @words = qw/this is a test/; > my @results = $wsd->disambiguate (context => [@words]); > print join (' ', @results), "\n"; > > Got these error : > Use of uninitialized value in right bitshift (>>) at > /usr/local/share/perl/5.8.8/WordNet/SenseRelate/AllWords.pm line 525. > Use of uninitialized value in subtraction (-) at > /usr/local/share/perl/5.8.8/WordNet/SenseRelate/AllWords.pm line 526. > > > My info : > > This is perl, v5.8.8 built for i486-linux-gnu-thread-multi > Linux william-pc 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 > i686 GNU/Linux > >
-- Ted Pedersen http://www.d.umn.edu/~tpederse
This bug was fixed in version 0.08 of WordNet-SenseRelate-AllWords. The problem was that if a window size was not given to the disambiguate method, no default was provided so the code tried to proceed with no window value. To correct this we've added a default window size of 3. A test case has been added to verify the fix.