|
From: <ssc...@us...> - 2003-04-19 11:22:50
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv21917
Modified Files:
Tag: v0/18/1
Bayes.pm
Log Message:
fix warning on unclassified message (bug 697278) and save new bucket default parameters
Index: Bayes.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v
retrieving revision 1.107.2.2
retrieving revision 1.107.2.3
diff -C2 -d -r1.107.2.2 -r1.107.2.3
*** Bayes.pm 8 Apr 2003 04:23:19 -0000 1.107.2.2
--- Bayes.pm 19 Apr 2003 11:22:46 -0000 1.107.2.3
***************
*** 215,223 ****
for my $bucket (keys %{$self->{total}}) {
! open PARAMS, ">$self->{configuration}->{configuration}{corpus}/$bucket/params";
! for my $param (keys %{$self->{parameters}{$bucket}}) {
! print PARAMS "$param $self->{parameters}{$bucket}{$param}\n";
}
- close PARAMS;
}
}
--- 215,224 ----
for my $bucket (keys %{$self->{total}}) {
! if (open PARAMS, ">$self->{configuration}->{configuration}{corpus}/$bucket/params") {
! for my $param (keys %{$self->{parameters}{$bucket}}) {
! print PARAMS "$param $self->{parameters}{$bucket}{$param}\n";
! }
! close PARAMS;
}
}
}
***************
*** 389,392 ****
--- 390,401 ----
$self->{colors}{unclassified} = 'black';
+
+ # SLM for unclassified "bucket" will always match the global setting
+
+ $self->{parameters}{unclassified}{subject} = $self->{configuration}->{configuration}{subject};
+
+ # Quarantine for unclassified will be off:
+
+ $self->{parameters}{unclassified}{quarantine} = 0;
print "Corpus loaded with $self->{full_total} entries\n" if $self->{debug};
***************
*** 428,432 ****
--- 437,444 ----
}
close PARAMS;
+ } else {
+ write_parameters();
}
+
# See if there are magnets defined
|