[Spambayes-checkins] spambayes hammiebulk.py,1.1.2.1,1.1.2.2
Tim Stone
timstone4@users.sourceforge.net
Fri Nov 22 03:00:48 2002
Update of /cvsroot/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv19744
Modified Files:
Tag: hammie-playground
hammiebulk.py
Log Message:
corrected module and class names
Index: hammiebulk.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Attic/hammiebulk.py,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** hammiebulk.py 21 Nov 2002 22:59:58 -0000 1.1.2.1
--- hammiebulk.py 22 Nov 2002 03:00:45 -0000 1.1.2.2
***************
*** 48,52 ****
--- 48,56 ----
import mboxutils
import classifier
+ import Persistent
import hammie
+ import Corpus
+
+ Corpus.Verbose = True
program = sys.argv[0] # For usage(); referenced by docstring above
***************
*** 107,122 ****
usedb is True."""
if usedb:
! bayes = PersistentBayes(pck, mode)
else:
! bayes = None
! try:
! fp = open(pck, 'rb')
! except IOError, e:
! if e.errno <> errno.ENOENT: raise
! else:
! bayes = pickle.load(fp)
! fp.close()
! if bayes is None:
! bayes = classifier.Bayes()
return bayes
--- 111,117 ----
usedb is True."""
if usedb:
! bayes = Persistent.DBDictClassifier(pck, mode)
else:
! bayes = Persistent.PickledClassifier(pck)
return bayes
More information about the Spambayes-checkins
mailing list