/[wait]/trunk/lib/WAIT/InvertedIndex.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/WAIT/InvertedIndex.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 7 by dpavlin, Sun May 23 17:28:48 2004 UTC revision 8 by dpavlin, Sun May 23 21:00:21 2004 UTC
# Line 423  sub search_raw { Line 423  sub search_raw {
423      }      }
424    
425      for (my $i=1; $i<@res; $i+=2) {      for (my $i=1; $i<@res; $i+=2) {
426        $res[$i] /= $self->{db}->{$M, $res[$i-1]} / $idf;        # fix division by zero
427          $res[$i] /= ($self->{db}->{$M, $res[$i-1]} || 1) / ($idf || 1);
428      }      }
429    
430      return @res      return @res

Legend:
Removed from v.7  
changed lines
  Added in v.8

  ViewVC Help
Powered by ViewVC 1.1.26