Skip to content
This repository

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

file 43 lines (27 sloc) 1.021 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
= 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
Something went wrong with that request. Please try again.