Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3602/spambayes
Modified Files:
UserInterface.py
Log Message:
Write preamble as soon as possible, to get something displayed.
When using upload box, should be recording training, not classifying.
When using upload box, add to session statistics.
Index: UserInterface.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/UserInterface.py,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** UserInterface.py 16 Mar 2005 22:36:33 -0000 1.55
--- UserInterface.py 6 Apr 2005 02:39:53 -0000 1.56
***************
*** 281,289 ****
def onClassify(self, file, text, which):
"""Classify an uploaded or pasted message."""
message = file or text
message = message.replace('\r\n', '\n').replace('\r', '\n') # For Macs
results = self._buildCluesTable(message)
results.classifyAnother = self._buildClassifyBox()
- self._writePreamble(_("Classify"))
self.write(results)
self._writePostamble()
--- 281,292 ----
def onClassify(self, file, text, which):
"""Classify an uploaded or pasted message."""
+ # XXX This doesn't get recorded in the session counts
+ # XXX for messages classified. That seems right to me (Tony),
+ # XXX but is easily changed if it isn't.
+ self._writePreamble(_("Classify"))
message = file or text
message = message.replace('\r\n', '\n').replace('\r', '\n') # For Macs
results = self._buildCluesTable(message)
results.classifyAnother = self._buildClassifyBox()
self.write(results)
self._writePostamble()
***************
*** 542,546 ****
msg = factory.create(key, message)
corpus.addMessage(msg)
! msg.RememberClassification(isSpam)
# Save the database and return a link Home and another training
--- 545,550 ----
msg = factory.create(key, message)
corpus.addMessage(msg)
! msg.RememberTrained(isSpam)
! self.stats.RecordTraining(not isSpam)
# Save the database and return a link Home and another training
_______________________________________________
Spambayes-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/spambayes-checkins