|
From: <jgr...@us...> - 2003-09-09 05:14:49
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv14716/Classifier
Modified Files:
Bayes.pm
Log Message:
HTML.pm:
Fix minor bugs pointed out by the test suite.
TestHTML.tst/TestHTML.script:
Tests for magnet classified mails, showing them in the
main history list, filter for magnet classified and
non-magnet classified mails, looking at a message in
the single message view and checking the magnet use
highlighting.
With this commit we have 100% line coverage for the
HTML.pm module (and with the previous commits today
100% coverage for all shipping POPFile modules).
Index: Bayes.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v
retrieving revision 1.188
retrieving revision 1.189
diff -C2 -d -r1.188 -r1.189
*** Bayes.pm 8 Sep 2003 18:03:57 -0000 1.188
--- Bayes.pm 9 Sep 2003 00:28:19 -0000 1.189
***************
*** 132,149 ****
# No default unclassified weight is the number of times more sure POPFile
! # must be of the top class vs the second class, default is 100 times more
! $self->config_( 'unclassified_weight', 100 );
# The corpus is kept in the 'corpus' subfolder of POPFile
$self->config_( 'corpus', 'corpus' );
# The characters that appear before and after a subject modification
$self->config_( 'subject_mod_left', '[' );
$self->config_( 'subject_mod_right', ']' );
# Get the hostname for use in the X-POPFile-Link header
$self->{hostname__} = hostname;
# Allow the user to override the hostname
$self->config_( 'hostname', $self->{hostname__} );
--- 132,154 ----
# No default unclassified weight is the number of times more sure POPFile
! # must be of the top class vs the second class, default is 10 times more
!
! $self->config_( 'unclassified_weight', 10 );
# The corpus is kept in the 'corpus' subfolder of POPFile
+
$self->config_( 'corpus', 'corpus' );
# The characters that appear before and after a subject modification
+
$self->config_( 'subject_mod_left', '[' );
$self->config_( 'subject_mod_right', ']' );
# Get the hostname for use in the X-POPFile-Link header
+
$self->{hostname__} = hostname;
# Allow the user to override the hostname
+
$self->config_( 'hostname', $self->{hostname__} );
***************
*** 946,950 ****
if ( open CLASS, '<' . $self->global_config_( 'msgdir' ) . $filename ) {
$bucket = <CLASS>;
! if ( $bucket =~ /([^ ]+) MAGNET (.+)/ ) {
$bucket = $1;
$magnet = $2;
--- 951,955 ----
if ( open CLASS, '<' . $self->global_config_( 'msgdir' ) . $filename ) {
$bucket = <CLASS>;
! if ( $bucket =~ /([^ ]+) MAGNET ([^\r\n]+)/ ) {
$bucket = $1;
$magnet = $2;
|