Class: Classified::Hoatzin

Inherits:
Base
  • Object
show all
Defined in:
lib/classifiers/hoatzin.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#transform

Constructor Details

#initialize(options = {}) ⇒ Hoatzin



6
7
8
# File 'lib/classifiers/hoatzin.rb', line 6

def initialize options = {}
  @classifier = ::Hoatzin::Classifier.new options
end

Instance Attribute Details

#classifierObject

Returns the value of attribute classifier.



5
6
7
# File 'lib/classifiers/hoatzin.rb', line 5

def classifier
  @classifier
end

Instance Method Details

#classificationsObject



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 options = {}
  # TODO: confirm this is a support method for the classifier
  @classifier.save options
end

#train(classification, text) ⇒ Object



10
11
12
# File 'lib/classifiers/hoatzin.rb', line 10

def train classification, text
  @classifier.train classification, text
end