Update of /cvsroot/spambayes/spambayes/contrib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17459
Modified Files:
tte.py
Log Message:
When running through the messages that haven't been kept for training,
delete messages that score properly. No sense hanging onto them.
Index: tte.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/contrib/tte.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** tte.py 17 Aug 2004 17:04:42 -0000 1.14
--- tte.py 1 Jan 2005 17:46:18 -0000 1.15
***************
*** 184,189 ****
while True:
msg = hambone.next()
! tdict[msg["message-id"]] = True
! nhamleft += 1
except StopIteration:
if nhamleft: print nhamleft, "untrained hams"
--- 184,191 ----
while True:
msg = hambone.next()
! score = store.spamprob(tokenize(msg))
! if score > ham_cutoff:
! tdict[msg["message-id"]] = True
! nhamleft += 1
except StopIteration:
if nhamleft: print nhamleft, "untrained hams"
***************
*** 193,198 ****
while True:
msg = spamcan.next()
! tdict[msg["message-id"]] = True
! nspamleft += 1
except StopIteration:
if nspamleft: print nspamleft, "untrained spams"
--- 195,202 ----
while True:
msg = spamcan.next()
! score = store.spamprob(tokenize(msg))
! if score < spam_cutoff:
! tdict[msg["message-id"]] = True
! nspamleft += 1
except StopIteration:
if nspamleft: print nspamleft, "untrained spams"
_______________________________________________
Spambayes-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/spambayes-checkins