Changeset 128

Show
Ignore:
Timestamp:
09.01.2007 01:09:51 (2 years ago)
Author:
decoder
Message:

Fixed ticket #50
Fixed fuzzy-find to assume a default score of 5 (or -5) if no --score is specified with --learn-spam/ham

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/devel/FuzzyOcr.pm

    r126 r128  
    577577                next; 
    578578            } 
    579             if (defined($conf->{focr_max_size_png}) and ($$pic{fsize} > $conf->{focr__max_size_png})) { 
     579            if (defined($conf->{focr_max_size_png}) and ($$pic{fsize} > $conf->{focr_max_size_png})) { 
    580580                infolog("PNG file size ($$pic{fsize}) exceeds maximum file size for this format, skipping..."); 
    581581                next; 
  • trunk/devel/Utils/fuzzy-find

    r107 r128  
    182182            my %DB; 
    183183            my $ff = $learn_spam ? 'db_hash' : 'db_safe'; 
     184            my $dfscore = $learn_spam ? 5 : -5; 
     185            $score = $score ? $score : $dfscore; 
    184186            tie %DB, 'MLDBM', $Files{$ff} or die "Can't open $ff"; 
    185187            print "Adding key to database...\n";