Class: OpenNlp::Tool

Inherits:
Object
  • Object
show all
Includes:
JavaClass
Defined in:
lib/open_nlp/tool.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from JavaClass

included

Constructor Details

#initialize(model) ⇒ Tool

Returns a new instance of Tool.



7
8
9
10
# File 'lib/open_nlp/tool.rb', line 7

def initialize(model)
  fail ArgumentError, 'model must be an OpenNlp::Model' unless model.is_a?(OpenNlp::Model)
  @j_instance = self.class.java_class.new(model.j_model)
end

Instance Attribute Details

#j_instanceObject (readonly)

Returns the value of attribute j_instance.



5
6
7
# File 'lib/open_nlp/tool.rb', line 5

def j_instance
  @j_instance
end