[Spambayes-checkins] spambayes pop3proxy.py,1.16.2.1,1.16.2.2

Tim Stone timstone4@users.sourceforge.net
Fri Nov 22 03:00:58 2002


Update of /cvsroot/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv19780

Modified Files:
      Tag: hammie-playground
	pop3proxy.py 
Log Message:
corrected module and class names

Index: pop3proxy.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/pop3proxy.py,v
retrieving revision 1.16.2.1
retrieving revision 1.16.2.2
diff -C2 -d -r1.16.2.1 -r1.16.2.2
*** pop3proxy.py	19 Nov 2002 23:45:25 -0000	1.16.2.1
--- pop3proxy.py	22 Nov 2002 03:00:56 -0000	1.16.2.2
***************
*** 113,117 ****
  import os, sys, re, operator, errno, getopt, cPickle, cStringIO, time, bisect
  import socket, asyncore, asynchat, cgi, urlparse, webbrowser
! import Bayes, tokenizer, mboxutils
  from FileCorpus import FileCorpus, FileMessageFactory, GzipFileMessageFactory
  from Options import options
--- 113,117 ----
  import os, sys, re, operator, errno, getopt, cPickle, cStringIO, time, bisect
  import socket, asyncore, asynchat, cgi, urlparse, webbrowser
! import Persistent, tokenizer, mboxutils
  from FileCorpus import FileCorpus, FileMessageFactory, GzipFileMessageFactory
  from Options import options
***************
*** 1037,1041 ****
  # This keeps the global state of the module - the command-line options,
  # statistics like how many mails have been classified, the handle of the
! # log file, the Bayes and FileCorpus objects, and so on.
  class State:
      def __init__(self):
--- 1037,1041 ----
  # This keeps the global state of the module - the command-line options,
  # statistics like how many mails have been classified, the handle of the
! # log file, the Classifier and FileCorpus objects, and so on.
  class State:
      def __init__(self):
***************
*** 1082,1088 ****
              self.databaseFilename = '_pop3proxy_test.pickle'   # Never saved
          if self.useDB:
!             self.bayes = Bayes.DBDictBayes(self.databaseFilename)
          else:
!             self.bayes = Bayes.PickledBayes(self.databaseFilename)
          print "Done."
  
--- 1082,1088 ----
              self.databaseFilename = '_pop3proxy_test.pickle'   # Never saved
          if self.useDB:
!             self.bayes = Persistent.DBDictClassifier(self.databaseFilename)
          else:
!             self.bayes = Persistent.PickledClassifier(self.databaseFilename)
          print "Done."
  
***************
*** 1109,1114 ****
  
              # Create the Trainers.
!             self.spamTrainer = Bayes.SpamTrainer(self.bayes)
!             self.hamTrainer = Bayes.HamTrainer(self.bayes)
              self.spamCorpus.addObserver(self.spamTrainer)
              self.hamCorpus.addObserver(self.hamTrainer)
--- 1109,1114 ----
  
              # Create the Trainers.
!             self.spamTrainer = Persistent.SpamTrainer(self.bayes)
!             self.hamTrainer = Persistent.HamTrainer(self.bayes)
              self.spamCorpus.addObserver(self.spamTrainer)
              self.hamCorpus.addObserver(self.hamTrainer)





More information about the Spambayes-checkins mailing list