Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 88456c4ec7
Fetching contributors…

Cannot retrieve contributors at this time

45 lines (27 sloc) 1.021 kb
= rbayes
Rubyforge Project:
http://rubyforge.org/projects/seattlerb
== About
rbayes is a bayesian classifier with an email-specific tokenizer.
rbayes was originally written by Dan Peterson and later refactored
into a single class.
== Installing rbayes
Install BDB1 from http://moulon.inra.fr/ruby/bdb1.html
Then install the gem:
$ sudo gem install rbayes
== Using rbayes
rb = RBayes.new 'inbox.db',
# mark a message as tasty:
rb.update_db_with email_message, :add_tasty
# mark a message as bland:
rb.update_db_with email_message, :add_bland
# remove a message's tastiness:
rb.update_db_with email_message, :remove_tasty
# remove a message's blandness:
rb.update_db_with email_message, :remove_bland
# switch a message from tasty to bland
rb.update_db_with email_message, :remove_tasty
rb.update_db_with email_message, :add_bland
# switch a message from bland to tasty
rb.update_db_with email_message, :remove_bland
rb.update_db_with email_message, :add_tasty
Jump to Line
Something went wrong with that request. Please try again.