Package opennlp.tools.sentdetect
Class NewlineSentenceDetector
- java.lang.Object
-
- opennlp.tools.sentdetect.NewlineSentenceDetector
-
- All Implemented Interfaces:
SentenceDetector
public class NewlineSentenceDetector extends Object implements SentenceDetector
The NewlineSentenceDetector
assumes that sentences are line delimited and recognizes one sentence per non-empty line.
-
-
Constructor Summary
Constructors Constructor Description NewlineSentenceDetector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
sentDetect(CharSequence s)
Detects sentences in a character sequence.Span[]
sentPosDetect(CharSequence s)
Detects sentences in a character sequence.
-
-
-
Method Detail
-
sentDetect
public String[] sentDetect(CharSequence s)
Description copied from interface:SentenceDetector
Detects sentences in a character sequence.- Specified by:
sentDetect
in interfaceSentenceDetector
- Parameters:
s
- TheCharSequence
for which sentences shall to be detected.- Returns:
- The String[] with the individual sentences as the array elements.
-
sentPosDetect
public Span[] sentPosDetect(CharSequence s)
Description copied from interface:SentenceDetector
Detects sentences in a character sequence.- Specified by:
sentPosDetect
in interfaceSentenceDetector
- Parameters:
s
- TheCharSequence
for which sentences shall be detected.- Returns:
- The array of
spans
(offsets intos
) for each detected sentence as the individuals array elements.
-
-