[Spambayes-checkins] spambayes/Outlook2000 train.py,1.13,1.14

Mark Hammond mhammond@users.sourceforge.net
Mon Nov 4 22:19:36 2002


Update of /cvsroot/spambayes/spambayes/Outlook2000
In directory usw-pr-cvs1:/tmp/cvs-serv17976

Modified Files:
	train.py 
Log Message:
Roll-back my previous "update probs" change - Tim's fix would have fixed it had I done a complete retain.  Done that now, and if I still need this Tim will sort it out once-and-for-all <wink>

Index: train.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/train.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** train.py	4 Nov 2002 01:12:53 -0000	1.13
--- train.py	4 Nov 2002 22:19:34 -0000	1.14
***************
*** 19,23 ****
      return spam == True
  
! def train_message(msg, is_spam, mgr, update_probs = True):
      # Train an individual message.
      # Returns True if newly added (message will be correctly
--- 19,23 ----
      return spam == True
  
! def train_message(msg, is_spam, mgr):
      # Train an individual message.
      # Returns True if newly added (message will be correctly
***************
*** 41,47 ****
      mgr.bayes.learn(tokens, is_spam, False)
      mgr.message_db[msg.searchkey] = is_spam
-     if update_probs:
-         mgr.bayes.update_probabilities()
- 
      mgr.bayes_dirty = True
      return True
--- 41,44 ----
***************
*** 54,58 ****
          progress.tick()
          try:
!             if train_message(message, isspam, mgr, False):
                  num_added += 1
          except:
--- 51,55 ----
          progress.tick()
          try:
!             if train_message(message, isspam, mgr):
                  num_added += 1
          except: