Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3305/spambayes
Modified Files:
ProxyUI.py
Log Message:
Record training in session statistics.
Index: ProxyUI.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/ProxyUI.py,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -d -r1.60 -r1.61
*** ProxyUI.py 28 Jan 2005 01:27:59 -0000 1.60
--- ProxyUI.py 6 Apr 2005 02:38:20 -0000 1.61
***************
*** 384,392 ****
for key, value in params.items():
if key.startswith('classify:'):
! id = key.split(':')[2]
if value == _('spam'):
targetCorpus = state.spamCorpus
elif value == _('ham'):
targetCorpus = state.hamCorpus
elif value == _('discard'):
targetCorpus = None
--- 384,394 ----
for key, value in params.items():
if key.startswith('classify:'):
! old_class, id = key.split(':')[1:3]
if value == _('spam'):
targetCorpus = state.spamCorpus
+ stats_as_ham = False
elif value == _('ham'):
targetCorpus = state.hamCorpus
+ stats_as_ham = True
elif value == _('discard'):
targetCorpus = None
***************
*** 417,420 ****
--- 419,424 ----
self.flush()
numTrained += 1
+ self.stats.RecordTraining(\
+ stats_as_ham, old_class=old_class)
except KeyError:
pass # Must be a reload.
_______________________________________________
Spambayes-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/spambayes-checkins