Class: OpenNlp::Tool
Direct Known Subclasses
Categorizer, Chunker, NamedEntityDetector, POSTagger, Parser, SentenceDetector, Tokenizer
Instance Attribute Summary collapse
-
#j_instance ⇒ Object
readonly
Returns the value of attribute j_instance.
Instance Method Summary collapse
-
#initialize(model) ⇒ Tool
constructor
A new instance of Tool.
Methods included from JavaClass
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_instance ⇒ Object (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 |