Created
August 24, 2011 21:44
-
-
Save rakasaka/1169338 to your computer and use it in GitHub Desktop.
Classification using Latent Semantic Indexing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'classifier' | |
require 'stemmer' | |
classifier_lsi = Classifier::LSI.new | |
classifier_lsi.add_item "a lion is a wild feline animal", :cat | |
classifier_lsi.add_item "a dog is a friendly animal", :dog | |
classifier_lsi.classify "a cat is a feline animal" | |
# Results | |
# => :cat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment