[spambayes-dev] Excellent program

Daniel Eloff eloff at helpmygame.com
Sat Aug 9 13:14:07 EDT 2003


A really excelent approach to the problem of spam. I'm going through the 
classification code and I came across two things I don't understand so far.

I'm trying to understand what these lines of code do in the classifier.py 
and chi2.py files:
(yesterday was my first brush with the python language).

in chi2_spamprob:

clues = self._getclues(wordstream)
for prob, word, record in clues

here we first see prob which is used extensively
throughout the function. It's obviosuly very key to understanding
the function, but I have no idea what value it is, or why
for that matter. word and record don't seem to be used...

and in chi2Q:

assert v & 1 == 0

What's this statment do? (I'm familair with assert statments, but not 
what's (v & 1) == 0 mean?

Thanks to anybody who can help me understand this.

-- 
-Daniel Eloff



More information about the spambayes-dev mailing list