Hallo,

i wrote a little open source plugin for The Bat! to filter spam,
because nobody of the plugin developer will open his plugin sources
(may be a hint for Alexey N. Vinogradov ;)). I do not really know why,
but it is a fact. May be this example make it easier for other
developers to create their own plugins or may be i can find someone
who want to help me out with some extensions of my code. The filter
mechanism is called bayes filter. If you want to know more about it
read http://www.paulgraham.com. The plugin is written in pure C++
(Visual Studio .NET 7.0) without any MFC extensions. But it is no
problem to use such extensions too. Because of the memory consumption
of the standard map and hashmap classes i wrote my own fast
implementation of a hashmap to collect the wordlist. For example the
hash_map from stl needs ~10MB memory for 100.000 words. My
implementation needs only ~3MB. May be someone can create a more
general template class for <string, ..., ... , ...>.

How is it working? Install the plugin (The Bat! must be at least
1.62/Beta7) and set the Filter value to 80% or something like that.
Now train the filter while you mark some spam messages as SPAM and
some ham messages as HAM (use the menu from The Bat!). Be sure that
you have at least 100 mails of each type (it filter nothing if you do
not train it with at least 1 spam and 1 ham). Please wait a little
bit, because the scan needs some time (~1min for 500 mails).

If this is done, all new messages gets filtered. If you close The Bat!
the worddatabase is stored in your The Bat! directory as database.dat.
You can open it with a normal texteditor...

If you have questions ask me, but before read the following:

1.) Don't ask me why it do not work for you!
2.) Don't ask me how you should install it!
3.) I developed this plugin in exactly 9 days, so it may have bugs and it is of course 
not complete!
4.) It is better to send me C++ code as to say that something do not work!
5.) I know that i use a unsupported function to get the mailbody!
6.) I know that it do not work with attachments at this time!
7.) I know that there is no working setup available!
8.) Be sure that you describe the problem as exactly as possible.

Achim Winkler


Download: http://www.lkcc.org/achim/download/bayesfilterplugin.zip


________________________________________________
http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to