public final class EndOfSentenceDetector extends Object
Constructor and Description |
---|
EndOfSentenceDetector(Pattern pattern)
Constructor.
|
EndOfSentenceDetector(Pattern pattern,
List<String> whiteList)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getSentenceEndPosition(String str)
Get sentence end position.
|
int |
getSentenceEndPosition(String str,
int startPosition)
Get sentence end position.
|
public EndOfSentenceDetector(Pattern pattern)
pattern
- end of sentence regex patternpublic int getSentenceEndPosition(String str)
str
- input stringpublic int getSentenceEndPosition(String str, int startPosition)
str
- input stringstartPosition
- start offset positionCopyright © 2015. All rights reserved.