Skip Menu |

This queue is for tickets about the Text-NSP CPAN distribution.

Report information
The Basics
Id: 39853
Status: resolved
Priority: 0/
Queue: Text-NSP

People
Owner: Nobody in particular
Requestors: SID [...] cpan.org
Cc: sidd [...] cs.utah.edu
tpederse [...] d.umn.edu
AdminCc:

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



CC: sidd [...] cs.utah.edu, tpederse [...] d.umn.edu
Subject: Use of uninitialized value in exponentiation
Hi Ted, I was trying to compute PMI for some data I'm analyzing... it looks like the Text::NSP::Measures::MI::pmi has a minor bug. I get these errors for each line of my input file: Use of uninitialized value in exponentiation (**) at /usr/local/share/perl/5.8.8/Text/NSP/Measures/2D/MI/pmi.pm line 144, <SRC> line 10643. It seems to be because the $exp variable hasn't been set to a default value (the documentation claims that the default value is 1). Seems like it should be an easy fix. I could look into the code tomorrow, and see if I can send you a patch. For now, I just thought I'd create a ticket for this issue until it gets resolved. Thanks. -- Sid.
Subject: seedjointcount.txt

Message body is not shown because it is too large.

Thanks for this report Sid. Curiously this error only occurs when you run pmi as follows: statistic.pl Text::NSP::Measures::2D::MI::pmi output input when running via our shortcut specification for the measure, as in .... statistic.pl pmi output input then things work fine. So the latter is at least a convenient work-around to the problem, although certainly there is an issue here that should be resolved! Thanks, Ted On Tue Oct 07 04:17:39 2008, SID wrote: Show quoted text
> Hi Ted, > > I was trying to compute PMI for some data I'm analyzing... it looks like > the Text::NSP::Measures::MI::pmi has a minor bug. I get these errors for > each line of my input file: > > Use of uninitialized value in exponentiation (**) at > /usr/local/share/perl/5.8.8/Text/NSP/Measures/2D/MI/pmi.pm line 144, > <SRC> line 10643. > > It seems to be because the $exp variable hasn't been set to a default > value (the documentation claims that the default value is 1). Seems like > it should be an easy fix. > > I could look into the code tomorrow, and see if I can send you a patch. > For now, I just thought I'd create a ticket for this issue until it gets > resolved. > > Thanks. > > -- Sid.
This bug has been fixed in version 1.11 of Text::NSP, released November 5, 2009.