Class: Classified::Hoatzin
Instance Attribute Summary collapse
-
#classifier ⇒ Object
Returns the value of attribute classifier.
Instance Method Summary collapse
- #classifications ⇒ Object
- #classify(text) ⇒ Object
-
#initialize(options = {}) ⇒ Hoatzin
constructor
A new instance of Hoatzin.
- #save(options = {}) ⇒ Object
- #train(classification, text) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(options = {}) ⇒ Hoatzin
6 7 8 |
# File 'lib/classifiers/hoatzin.rb', line 6 def initialize = {} @classifier = ::Hoatzin::Classifier.new end |
Instance Attribute Details
#classifier ⇒ Object
Returns the value of attribute classifier.
5 6 7 |
# File 'lib/classifiers/hoatzin.rb', line 5 def classifier @classifier end |
Instance Method Details
#classifications ⇒ Object
18 19 20 |
# File 'lib/classifiers/hoatzin.rb', line 18 def classifications @classifier.classifications end |
#classify(text) ⇒ Object
14 15 16 |
# File 'lib/classifiers/hoatzin.rb', line 14 def classify text @classifier.classify text end |
#save(options = {}) ⇒ Object
22 23 24 25 |
# File 'lib/classifiers/hoatzin.rb', line 22 def save = {} # TODO: confirm this is a support method for the classifier @classifier.save end |
#train(classification, text) ⇒ Object
10 11 12 |
# File 'lib/classifiers/hoatzin.rb', line 10 def train classification, text @classifier.train classification, text end |