[Spambayes] Guidance re pickles versus DB for Outlook

Jeremy Hylton jeremy@alum.mit.edu
Tue Nov 26 18:28:09 2002


>>>>> "TAP" == T Alexander Popiel <popiel@wolfskeep.com> writes:

  TAP> In message: <15843.43038.341350.515691@slothrop.zope.com>
  TAP>              Jeremy Hylton <jeremy@alum.mit.edu> writes:

  >> I just did a cvs update in spambayes and tried to restart my
  >> pspam code, but nothing is working anymore :-(.  I'm sorry I
  >> haven't had time to read every message on the proposed changes,
  >> but there's been a flurry of activity and I've got a day job.

  TAP> Yeah, there's been a bunch of changes, mostly revolving around
  TAP> the removal of update_probabilities.

Except that it wasn't removed!  It's just a big decoy waiting to lure
people reading the code away from the interface.

  >> Anyway, here's a traceback.  Can anyone suggest quickly how I
  >> would fix this?  The pspam code calls learn() for a bunch of
  >> messages and then calls update_probabilities() at the end.  Is
  >> that the default now?  Or is that a discontinued feature?  Are
  >> the APIs documented anywhere?

  TAP> You need to remove the _last_ argument passed to learn(),
  TAP> dealing with whether or not to run update_probabilities().
  TAP> Judging by later mail, it sounds like you removed the
  TAP> second-to-last argument (ham vs.  spam), and are now calling
  TAP> everything ham.

Except that I didn't.  It's pretty easy to remove the last argument
:-). 

  TAP> You should also remove the call to update_probabilities(),
  TAP> since it's toast, but it sounds like you already did that.

  TAP> The API is unfortunately not documented yet; until someone goes
  TAP> back through and updates it, the code itself will be the best
  TAP> documentation.

Except that the code has docstrings that are wrong.

  TAP> Addressing a concern from a later mail, the MetaInfo class
  TAP> exists to make it easier to derive subclasses of the classifier
  TAP> and its parts, without having to touch everything.

This sounds like YAGNI to me.

Jeremy




More information about the Spambayes mailing list