I’m trying to use the Ankusa (https://github.com/livingsocial/ankusa) gem in a ruby project I’m working on.
I’m running the code below with the ankusa gem installed but I still get an error:
uninitialized constant Ankusa::MemoryStorage (NameError)
require 'rubygems'
require 'ankusa'
require 'ankusa/hbase_storage'
storage = Ankusa::MemoryStorage.new
c = Ankusa::NaiveBayesClassifier.new storage
c.train :spam, "This is some spammy text"
c.train :good, "This is not the bad stuff"
puts c.classify "This is some spammy text"
puts c.classifications "This is some spammy text"
puts c.log_likelihoods "This is some spammy text"
puts c.classnames
storage.close
Any help would be greatly appreciated.
have a look at
ankusa.rbwithin the gem folder. It only requires the following:so, you might need to require it explicitly