[Spambayes-checkins] spambayes/spambayes Options.py, 1.98,
1.99 ProxyUI.py, 1.38, 1.39
Anthony Baxter
anthonybaxter at users.sourceforge.net
Mon Jan 12 01:46:35 EST 2004
Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv5305
Modified Files:
Options.py ProxyUI.py
Log Message:
New options ham_discard_level and spam_discard_level. These make the
interface default to discard hams/spams in the training interface.
Obviously, if you have the system training on everything as it filters,
it will make no difference at all.
Index: Options.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/Options.py,v
retrieving revision 1.98
retrieving revision 1.99
diff -C2 -d -r1.98 -r1.99
*** Options.py 5 Jan 2004 17:40:25 -0000 1.98
--- Options.py 12 Jan 2004 06:46:33 -0000 1.99
***************
*** 911,914 ****
--- 911,924 ----
("ham", "spam", "discard", "defer"), RESTORE),
+ ("ham_discard_level", "Ham Discard Level", 0.0,
+ """Hams scoring less than this percentage will default to being
+ discarded in the training interface (they won't be trained).""",
+ REAL, RESTORE),
+
+ ("spam_discard_level", "Spam Discard Level", 100.0,
+ """Spams scoring more than this percentage will default to being
+ discarded in the training interface (they won't be trained).""",
+ REAL, RESTORE),
+
("http_authentication", "HTTP Authentication", "None",
"""This option lets you choose the security level of the web interface.
Index: ProxyUI.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/ProxyUI.py,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** ProxyUI.py 7 Jan 2004 06:04:44 -0000 1.38
--- ProxyUI.py 12 Jan 2004 06:46:33 -0000 1.39
***************
*** 139,142 ****
--- 139,144 ----
('html_ui', 'default_spam_action'),
('html_ui', 'default_unsure_action'),
+ ('html_ui', 'ham_discard_level'),
+ ('html_ui', 'spam_discard_level'),
('html_ui', 'allow_remote_connections'),
('html_ui', 'http_authentication'),
***************
*** 290,298 ****
self._getTimeRange(self._keyToTimestamp(key))
row = self.html.reviewRow.clone()
if label == 'Spam':
! r_att = getattr(row, options["html_ui",
"default_spam_action"])
elif label == 'Ham':
! r_att = getattr(row, options["html_ui",
"default_ham_action"])
else:
--- 292,307 ----
self._getTimeRange(self._keyToTimestamp(key))
row = self.html.reviewRow.clone()
+ score = float(messageInfo.score.rstrip('%'))
if label == 'Spam':
! if score > options["html_ui", "spam_discard_level"]:
! r_att = getattr(row, 'discard')
! else:
! r_att = getattr(row, options["html_ui",
"default_spam_action"])
elif label == 'Ham':
! if score < options["html_ui", "ham_discard_level"]:
! r_att = getattr(row, 'discard')
! else:
! r_att = getattr(row, options["html_ui",
"default_ham_action"])
else:
More information about the Spambayes-checkins
mailing list