Changeset 82

Show
Ignore:
Timestamp:
03.12.2006 00:16:01 (2 years ago)
Author:
decoder
Message:

New option focr_unique_matches: Forces FuzzyOcr? to match each word only once per image (reduces FPs)
Small bugfix with $errstr

Files:

Legend:

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

    r81 r82  
    185185#focr_counts_required 3 
    186186 
     187# Setting this will cause every word to be matched only once per image (Default value: 0) 
     188#focr_unique_matches 1 
     189 
    187190# This is the score for a hit after focr_counts_required matches 
    188191# Default value: 5 
  • trunk/devel/FuzzyOcr.pm

    r81 r82  
    691691                chomp $retcode; 
    692692                my $errstr = "Return code: $retcode, Error: "; 
    693                 my $errstr .= join( '', @result ); 
     693                $errstr .= join( '', @result ); 
    694694                infolog("Errors in Scanset \"$scanlabel\""); 
    695695                infolog($errstr); 
     
    731731                                . " scanned with scanset \"$scanlabel\"" 
    732732                            ); 
     733                            if ($conf->{focr_unique_matches}) { 
     734                                last; 
     735                            } 
    733736                        } 
    734737                    } 
  • trunk/devel/FuzzyOcr/Config.pm

    r81 r82  
    307307        default => 1.5, 
    308308        type => $Mail::SpamAssassin::Conf::CONF_TYPE_NUMERIC 
     309    }); 
     310    push (@cmds, { 
     311        setting => 'focr_unique_matches', 
     312        default => 0, 
     313        type => $Mail::SpamAssassin::Conf::CONF_TYPE_BOOL 
    309314    }); 
    310315