Update of /cvsroot/popfile/engine
In directory sc8-pr-cvs1:/tmp/cvs-serv17280
Modified Files:
color.pl
Log Message:
change handling of bayes::{scores__} to reduce burden on forking
(Disables saving of scores where not needed, clears scores after where enabled)
Index: color.pl
===================================================================
RCS file: /cvsroot/popfile/engine/color.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** color.pl 13 Feb 2003 14:22:34 -0000 1.6
--- color.pl 16 Apr 2003 00:59:56 -0000 1.7
***************
*** 11,14 ****
--- 11,15 ----
use Classifier::MailParse;
use Classifier::Bayes;
+ use POPFile::Configuration;
# main
***************
*** 17,28 ****
{
my $m = new Classifier::MailParse;
! $m->{bayes} = new Classifier::Bayes;
! if ( $m->{bayes}->initialize() == 0 ) {
die "Failed to start while initializing the classifier module";
}
! $m->{bayes}->load_word_matrix();
! $m->{color} = 1;
print $m->parse_stream($ARGV[0]);
}
--- 18,33 ----
{
my $m = new Classifier::MailParse;
! $m->{bayes__} = new Classifier::Bayes;
! $m->{configuration__} = new POPFile::Configuration;
! $m->{configuration__}->{configuration__} = $m->{configuration__};
! $m->{bayes__}->{configuration__} = $m->{configuration__};
!
! if ( $m->{bayes__}->initialize() == 0 ) {
die "Failed to start while initializing the classifier module";
}
! $m->{bayes__}->load_word_matrix_();
! $m->{color__} = 1;
print $m->parse_stream($ARGV[0]);
}
|