[Spambayes-checkins] spambayes/Outlook2000 train.py,1.16,1.17
Tim Peters
tim_one@users.sourceforge.net
Wed Nov 13 05:29:15 2002
Update of /cvsroot/spambayes/spambayes/Outlook2000
In directory usw-pr-cvs1:/tmp/cvs-serv4228
Modified Files:
train.py
Log Message:
train_message(): When rescoring was asked for, it had no visible
effect, since the probabilities didn't get updated after training.
So update the probs before rescoring.
Index: train.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/train.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** train.py 7 Nov 2002 22:30:09 -0000 1.16
--- train.py 13 Nov 2002 05:29:10 -0000 1.17
***************
*** 26,30 ****
return spam == True
! def train_message(msg, is_spam, mgr, rescore = False):
# Train an individual message.
# Returns True if newly added (message will be correctly
--- 26,30 ----
return spam == True
! def train_message(msg, is_spam, mgr, rescore=False):
# Train an individual message.
# Returns True if newly added (message will be correctly
***************
*** 54,57 ****
--- 54,58 ----
if rescore:
import filter
+ mgr.bayes.update_probabilities() # else rescoring gives the same score
filter.filter_message(msg, mgr, all_actions = False)
More information about the Spambayes-checkins
mailing list