Sha256: 7f8fcd0ea4534f044feef20b00e9eb4c42fd171320080dbd07161182e7394a08

Contents?: true

Size: 285 Bytes

Versions: 6

Compression:

Stored size: 285 Bytes

Contents

module OpenNlp
  class SentenceDetector < Tool
    self.java_class = Java::opennlp.tools.sentdetect.SentenceDetectorME

    def detect(string)
      raise ArgumentError, "string must be a String" unless string.is_a?(String)
      @j_instance.sentDetect(string).to_ary
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
open_nlp-0.0.6-java lib/open_nlp/sentence_detector.rb
open_nlp-0.0.5-java lib/open_nlp/sentence_detector.rb
open_nlp-0.0.4-java lib/open_nlp/sentence_detector.rb
open_nlp-0.0.3-java lib/open_nlp/sentence_detector.rb
open_nlp-0.0.2-java lib/open_nlp/sentence_detector.rb
open_nlp-0.0.1-java lib/open_nlp/sentence_detector.rb