Class: OpenNLP::ChunkerME

Inherits:
Base
  • Object
show all
Defined in:
lib/open-nlp/classes.rb

Instance Method Summary collapse

Methods inherited from Base

#has_default_model?, #initialize, #last_name, #method_missing, #requires_model?

Constructor Details

This class inherits a constructor from OpenNLP::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class OpenNLP::Base

Instance Method Details

#chunk(tokens, tags) ⇒ Object



23
24
25
26
27
28
29
30
31
# File 'lib/open-nlp/classes.rb', line 23

def chunk(tokens, tags)
  if !tokens.is_a?(Array)
    tokens = tokens.to_a
    tags = tags.to_a
  end
  tokens = tokens.to_java(:String)
  tags = tags.to_java(:String)
  @proxy_inst.chunk(tokens,tags).to_a
end