[Python-checkins] python/nondist/sandbox/spambayes timtest.py,1.14,1.15

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Tue, 03 Sep 2002 18:21:22 -0700


Update of /cvsroot/python/python/nondist/sandbox/spambayes
In directory usw-pr-cvs1:/tmp/cvs-serv14883

Modified Files:
	timtest.py 
Log Message:
Augmented the spam callback to display spams with low probability.


Index: timtest.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/spambayes/timtest.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** timtest.py	3 Sep 2002 23:53:36 -0000	1.14
--- timtest.py	4 Sep 2002 01:21:20 -0000	1.15
***************
*** 616,619 ****
--- 616,628 ----
              def new_spam(msg, prob):
                  local_spam_hist.add(prob)
+                 if prob < 0.1:
+                     print
+                     print "Low prob spam!", prob
+                     print msg.path
+                     prob, clues = c.spamprob(msg, True)
+                     for clue in clues:
+                         print "prob(%r) = %g" % clue
+                     print
+                     print msg.guts
  
              t.reset_test_results()