Class SentDetector
- java.lang.Object
-
- io.github.crew102.rapidrake.opennlpUtils.SentDetector
-
public class SentDetector extends Object
A wrapper around opennlp.tools.sentdetect.SentenceDetectorME.
-
-
Constructor Summary
Constructors Constructor Description SentDetector(InputStream sentDectStream)
Constructor.SentDetector(String sentDectModelUrl)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description opennlp.tools.sentdetect.SentenceDetectorME
getSentDetector()
Get the sentence detector.
-
-
-
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
- ifsentDectModelUrl
orsentDectStream
is invalid
-
-