[Spambayes-checkins] spambayes/Outlook2000 filter.py,1.34,1.35
Tim Peters
tim_one at users.sourceforge.net
Thu Oct 2 13:47:41 EDT 2003
Update of /cvsroot/spambayes/spambayes/Outlook2000
In directory sc8-pr-cvs1:/tmp/cvs-serv19162/Outlook2000
Modified Files:
filter.py
Log Message:
filter_message(): spam and unsures were double-counted in the stats.
Index: filter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/filter.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** filter.py 29 Sep 2003 02:14:25 -0000 1.34
--- filter.py 2 Oct 2003 17:47:39 -0000 1.35
***************
*** 13,25 ****
config = mgr.config.filter
prob = mgr.score(msg)
prob_perc = prob * 100
if prob_perc >= config.spam_threshold:
disposition = "Yes"
attr_prefix = "spam"
- mgr.stats.num_spam += 1
elif prob_perc >= config.unsure_threshold:
disposition = "Unsure"
attr_prefix = "unsure"
- mgr.stats.num_unsure += 1
else:
disposition = "No"
--- 13,24 ----
config = mgr.config.filter
prob = mgr.score(msg)
+ mgr.stats.RecordClassification(prob)
prob_perc = prob * 100
if prob_perc >= config.spam_threshold:
disposition = "Yes"
attr_prefix = "spam"
elif prob_perc >= config.unsure_threshold:
disposition = "Unsure"
attr_prefix = "unsure"
else:
disposition = "No"
***************
*** 80,84 ****
raise RuntimeError, "Eeek - bad action '%r'" % (action,)
- mgr.stats.RecordClassification(prob)
return disposition
except:
--- 79,82 ----
More information about the Spambayes-checkins
mailing list