in reply to 'undef' in the matrix instead of values!!!

Did you ever print out $#words after $words was populated? (It's possible your loops never executed.)

Is it possible for getRelatedness to return an undef?

  • Comment on Re: 'undef' in the matrix instead of values!!!

Replies are listed 'Best First'.
Re^2: 'undef' in the matrix instead of values!!!
by Anonymous Monk on Feb 06, 2008 at 13:41 UTC
    tx for reply. I tried to print S#words before and it gave me 3 coz i have only 4 words morever my loop works as i checked before. relatedness shouldnt give any undef value. thats what i wonder. atleast for two similar values it shoudlnt.
      I'd debug (or put prints) in sub similarity. Does $obj get a value other than undef? Does $simi?