Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv21462/Classifier
Modified Files:
MailParse.pm
Log Message:
Fix bug in calculation of htmlcolordistance (just another reason why I need to finish the test suite)
Index: MailParse.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/MailParse.pm,v
retrieving revision 1.138
retrieving revision 1.139
diff -C2 -d -r1.138 -r1.139
*** MailParse.pm 23 Jun 2003 20:35:05 -0000 1.138
--- MailParse.pm 25 Jun 2003 15:37:45 -0000 1.139
***************
*** 97,101 ****
$self->{htmlcolordistance__} = 0;
- compute_html_color_distance( $self );
# This is a mapping between HTML color names and HTML hexadecimal color values used by the
--- 97,100 ----
***************
*** 181,185 ****
{
my ( $self ) = @_;
! $self->{htmlcolordistance__} = compute_rgb_distance( $self->{htmlfontcolor__},
$self->{htmlbackcolor__} );
}
--- 180,184 ----
{
my ( $self ) = @_;
! $self->{htmlcolordistance__} = $self->compute_rgb_distance( $self->{htmlfontcolor__},
$self->{htmlbackcolor__} );
}
***************
*** 342,345 ****
--- 341,345 ----
# bound for tracking evil spammer tricks with similar colors
+ $self->compute_html_color_distance();
if ( $self->{htmlcolordistance__} < 100 ) {
$self->update_pseudoword( 'html', "colordistance$self->{htmlcolordistance__}", $encoded, '' );
|