GFilt
Have you ever wished that your email program could create
filters automatically based on how you have manually sorted
your files? In effect such a program would need to learn how
to filter files and figure out what criteria you are using.
GFilt is a prototype system which does just this using a
Genetic Algorithm. GFilt's filters are quite simple, they
look like this:
"dog" or "cat" and then "elephant" or "cow"
This would match any string which contained either the string
"dog" or "cat" followed by either the string "elephant" or
"cow".
To try this out you will need a copy of the JDK 1.2.
Download GFilt.tgz and
decompress it inside a directory that is in your CLASSPATH.
From within the GFilt directory that has now been created
type "javac *.java". Then type "java GFilt.Breeder". You
will see a list of GFilt filters shoot by. Each of these is
the best filter in successive generations. If you look at
the top of Breeder.java you will see where I specify the
example strings which GFilt is attempting to learn how to
filter. Feel free to change these and recompile. When
it appears that there is no improvement, GFilt will stop and
print out the best possible filter.
I created this code as a proof-of-concept for a mechanism
which could be incorporated into the Mozilla, as a response
to
bug #11036 in the Mozilla bug-tracking system.
The code is not very well documented, but a reasonable Java
coder should be able to make sense of it. If you manage to
turn this into anything useful (which should actually be
quite easy as I have done the hard work!) be sure to inform me.
I have placed GFilt under the GNU Public License.