[Spambayes] CdbClassifer [sic]
Jamie Heilman
jamie at audible.transient.net
Wed Apr 9 21:28:53 EDT 2003
CdbClassifier is misspelt throughout the spambayes project tree as
"CdbClassifer" attached patch fixes this.
--
Jamie Heilman http://audible.transient.net/~jamie/
"I was in love once -- a Sinclair ZX-81. People said, "No, Holly, she's
not for you." She was cheap, she was stupid and she wouldn't load
-- well, not for me, anyway." -Holly
-------------- next part --------------
--- mailsort.py 16 Feb 2003 17:05:07 -0000 1.6
+++ mailsort.py 10 Apr 2003 03:22:22 -0000
@@ -30,11 +30,11 @@
DB_FILE = os.path.expanduser(DB_FILE)
def import_spambayes():
- global mboxutils, CdbClassifer, tokenize
+ global mboxutils, CdbClassifier, tokenize
if not os.environ.has_key('BAYESCUSTOMIZE'):
os.environ['BAYESCUSTOMIZE'] = os.path.expanduser(CONFIG_FILE)
from spambayes import mboxutils
- from spambayes.cdb_classifier import CdbClassifer
+ from spambayes.cdb_classifier import CdbClassifier
from spambayes.tokenizer import tokenize
@@ -87,7 +87,7 @@
if not os.path.exists(rc_dir):
print "Creating", RC_DIR, "directory..."
os.mkdir(rc_dir)
- bayes = CdbClassifer()
+ bayes = CdbClassifier()
print 'Training with ham...'
train(bayes, ham_name, False)
print 'Training with spam...'
@@ -123,7 +123,7 @@
del blocks
msg = email.message_from_string(msgdata)
del msgdata
- bayes = CdbClassifer(open(DB_FILE, 'rb'))
+ bayes = CdbClassifier(open(DB_FILE, 'rb'))
prob = bayes.spamprob(tokenize(msg))
else:
prob = 0.0
@@ -138,7 +138,7 @@
def print_message_score(msg_name, msg_fp):
msg = email.message_from_file(msg_fp)
- bayes = CdbClassifer(open(DB_FILE, 'rb'))
+ bayes = CdbClassifier(open(DB_FILE, 'rb'))
prob, evidence = bayes.spamprob(tokenize(msg), evidence=True)
print msg_name, prob
for word, prob in evidence:
--- spambayes/cdb_classifier.py 20 Jan 2003 03:14:32 -0000 1.1
+++ spambayes/cdb_classifier.py 10 Apr 2003 03:22:40 -0000
@@ -10,7 +10,7 @@
from spambayes.tokenizer import tokenize
from spambayes.classifier import Classifier
-class CdbClassifer(Classifier):
+class CdbClassifier(Classifier):
def __init__(self, cdbfile=None):
Classifier.__init__(self)
if cdbfile is not None:
More information about the Spambayes
mailing list