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