github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

cardmagic / classifier

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 93
    • 18
  • Source
  • Commits
  • Network (18)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Click here to lend your support to: classifier and make a donation at www.pledgie.com ! Edit Pledgie Setup

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

A general classifier module to allow Bayesian and other types of classifications. — Read more

  cancel

http://rubyforge.org/projects/classifier/

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

added Cameron as author, Rakefile version bump for 1.3.1 release 
cmcbride (author)
Sun Jan 20 04:00:06 -0800 2008
commit  ea24a2f1ea01abd882e6e354201c28a2e796133f
tree    a815f0fc7ddb5e1d7762562ac6e5cee334f019d3
parent  eb7965c2319282d00753e8fc526c09e0624db7e7
classifier /
name age
history
message
file LICENSE Thu Feb 02 08:45:14 -0800 2006 Adding files git-svn-id: http://classifier.rub... [cardmagic]
file README Sun Jan 20 04:00:06 -0800 2008 added Cameron as author, Rakefile version bump ... [cmcbride]
file Rakefile Sun Jan 20 04:00:06 -0800 2008 added Cameron as author, Rakefile version bump ... [cmcbride]
directory bin/ Sat Sep 22 16:13:02 -0700 2007 minor tweaks so that LSI plays well with modern... [cmcbride]
file install.rb Sat Sep 22 16:13:02 -0700 2007 minor tweaks so that LSI plays well with modern... [cmcbride]
directory lib/ Sat Sep 22 16:13:02 -0700 2007 minor tweaks so that LSI plays well with modern... [cmcbride]
directory test/ Thu Feb 02 08:45:14 -0800 2006 Adding files git-svn-id: http://classifier.rub... [cardmagic]
README
== Welcome to Classifier

Classifier is a general module to allow Bayesian and other types of classifications.

== Download

* http://rubyforge.org/projects/classifier
* gem install classifier
* svn co http://rufy.com/svn/classifier/trunk

== Dependencies
If you install Classifier from source, you'll need to install Martin Porter's stemmer algorithm with RubyGems as 
follows:
  gem install stemmer

If you would like to speed up LSI classification by at least 10x, please install the following libraries:
GNU GSL:: http://www.gnu.org/software/gsl
rb-gsl:: http://rb-gsl.rubyforge.org

Notice that LSI will work without these libraries, but as soon as they are installed, Classifier will make use of them. 
No configuration changes are needed, we like to keep things ridiculously easy for you.

== Bayes
A Bayesian classifier by Lucas Carlson. Bayesian Classifiers are accurate, fast, and have modest memory requirements.

=== Usage
    require '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'
    
    require 'madeleine'
    m = SnapshotMadeleine.new("bayes_data") {
        Classifier::Bayes.new 'Interesting', 'Uninteresting'
    }
    m.system.train_interesting "here are some good words. I hope you love them"
    m.system.train_uninteresting "here are some bad words, I hate you"
    m.take_snapshot
    m.system.classify "I love you" # returns 'Interesting'

Using Madeleine, your application can persist the learned data over time.

=== Bayesian Classification

* http://www.process.com/precisemail/bayesian_filtering.htm
* http://en.wikipedia.org/wiki/Bayesian_filtering
* http://www.paulgraham.com/spam.html

== LSI
A Latent Semantic Indexer by David Fayram. Latent Semantic Indexing engines
are not as fast or as small as Bayesian classifiers, but are more flexible, providing 
fast search and clustering detection as well as semantic analysis of the text that 
theoretically simulates human learning.

=== Usage
  require 'classifier'
  lsi = Classifier::LSI.new
  strings = [ ["This text deals with dogs. Dogs.", :dog],
              ["This text involves dogs too. Dogs! ", :dog],
              ["This text revolves around cats. Cats.", :cat],
              ["This text also involves cats. Cats!", :cat],
              ["This text involves birds. Birds.",:bird ]]
  strings.each {|x| lsi.add_item x.first, x.last}
  
  lsi.search("dog", 3)
  # returns => ["This text deals with dogs. Dogs.", "This text involves dogs too. Dogs! ", 
  #             "This text also involves cats. Cats!"]

  lsi.find_related(strings[2], 2)
  # returns => ["This text revolves around cats. Cats.", "This text also involves cats. Cats!"]
  
  lsi.classify "This text is also about dogs!"
  # returns => :dog
  
Please see the Classifier::LSI documentation for more information. It is possible to index, search and classify
with more than just simple strings. 

=== Latent Semantic Indexing
* http://www.c2.com/cgi/wiki?LatentSemanticIndexing
* http://www.chadfowler.com/index.cgi/Computing/LatentSemanticIndexing.rdoc
* http://en.wikipedia.org/wiki/Latent_semantic_analysis

== Authors    
* Lucas Carlson  (mailto:lucas@rufy.com)
* David Fayram II (mailto:dfayram@gmail.com)
* Cameron McBride (mailto:cameron.mcbride@gmail.com)

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

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server