Class SentDetector


  • public class SentDetector
    extends Object
    A wrapper around opennlp.tools.sentdetect.SentenceDetectorME.
    • Constructor Detail

      • SentDetector

        public SentDetector​(String sentDectModelUrl)
        Constructor.
        Parameters:
        sentDectModelUrl - the URL of a sentence detection model
      • SentDetector

        public SentDetector​(InputStream sentDectStream)
        Constructor.
        Parameters:
        sentDectStream - the input stream of the sentence detection model
    • Method Detail

      • getSentDetector

        public opennlp.tools.sentdetect.SentenceDetectorME getSentDetector()
                                                                    throws IOException
        Get the sentence detector.
        Returns:
        a opennlp.tools.sentdetect.SentenceDetectorME
        Throws:
        IOException - if sentDectModelUrl or sentDectStream is invalid