Bayesian classification in Ruby without a lot of fuss.
Ruby
Switch branches/tags
Pull request Compare This branch is 36 commits ahead, 29 commits behind cardmagic:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
LICENSE
README.rdoc
Rakefile
VERSION
simple_classifier.gemspec

README.rdoc

simple_classifier

Bayesian Classification without a lot of fuss

Installation

  • gem install simple_classifier

simple_classifier depends on Martin Porter's stemmer gem, which should be installed when you run the command above.

Usage

require 'simple_classifier'
b = Classifier::Bayes.new 'Interesting', 'Uninteresting'
b.train_interesting "here are some good words. I hope you love them"
b.train_uninteresting "here are some bad words, I hate you"
b.classify "I hate bad words and you" # returns 'Uninteresting'

More info on Bayesian Classification

Authors

  • Ben Orenstein ben.orenstein@gmail.com

  • Lucas Carlson lucas@rufy.com

This library is released under the terms of the GNU LGPL. See LICENSE for more details.