[Spambayes] Possible to merge Spambayes databases?

Tony Meyer tameyer at ihug.co.nz
Tue Mar 23 21:27:41 EST 2004


[Roar Jøssund]
> Is it possible to merge the Spambayes databases so 
> I don’t have to
> classify the same things as spam at home that I already have
> classified as spam at work and vice versa?

[Skip]
> Yeah, with a little effort.  Do you already write programs in Python?

Or even with less effort and no programming <wink>.  Using that same
sb_dbexpimp.py script Skip mentioned (either the CVS one or the 1.0a9 one)
do:

    sb_dbexpimp.py -e -d home.db -f home.export
    sb_dbexpimp.py -e -d work.db -f work.export
    sb_dbexpimp.py -i -d home_and_work.db -f home.export
    sb_dbexpimp.py -i -m -d home_and_work.db -f work.export

(This assumes that they're both DBM and not pickles.  If you don't know,
then that'll be the case).  The first two lines export the existing
databases to the 'interchange format', the third loads the 'home' one into a
new database, and the fourth *adds* the 'work' one into that database.

If you want to just add the 'home' one to the 'work one, you can just do:

    sb_dbexpimp.py -e -d home.db -f home.export
    sb_dbexpimp.py -i -m -d work.db -f home.export

=Tony Meyer

---
Please always include the list (spambayes at python.org) in your replies
(reply-all), and please don't send me personal mail about SpamBayes. This
way, you get everyone's help, and avoid a lack of replies when I'm busy.




More information about the Spambayes mailing list