[Spambayes] proposed changes to hammie & co.

Neale Pickett neale@woozle.org
Wed Nov 20 00:02:58 2002


I just realized that I failed to respond to your points :)


So then, Tim Stone - Four Stones Expressions <tim@fourstonesExpressions.com> is all like:

> Neale, I'm ok with these changes.  I have more to make, but go ahead
> and make these alterations.  Particularly, I've got a dbdict class
> that supports load/store, so we don't have to worry about training
> that blows up before we save nham and nspam.

I'm curious about how you're doing this.  I briefly had a DBDict which
cached anything you tried to write to it, but it didn't seem like an
improvement so I dropped it, figuring ZODB was probably a better
solution.

> I think we should think about where WordInfo class goes...

That's rather unorthodox.  Why?

> I'm not sure I like having mode on the dbdict constructor, although I
> understand why you have it.  No harm done, as it defaults anyway.

I'm not sure I like it either, but I didn't know where else to put it.
If you think of a better solution, feel free to change it.

> I think we should take Bayes out of classifier and put it in Bayes.py

Now that's downright heretical!  ;)  It makes sense, I think, Bayes.py
being where all the Bayes stuff hangs out.  But if you take WordInfo out
of classifier, and you take Bayes out of classifier, all you'll have
left is two constants.  Maybe you just want to rename classifier.py.  I
wonder what the other Tim thinks about this idea...

> I like widict as a class, but it could be abstracted another notch by
> simply specifying the class to instantiate when you find a 'w' in the
> pickle, as an operand on the constructor.

I'm leaning heavily toward dictching WIDict and subclassing
Pickler/Unpickler; I think that's the Right Thing.  It will be slower
running, but maybe not significantly so.  I'll run some trials when I
get home.

Neale



More information about the Spambayes mailing list