Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Add Comment
Please, Sign In to add comment