public class DefaultEndOfSentenceScanner extends Object implements EndOfSentenceScanner
EndOfSentenceScanner.
It uses an character array with possible end of sentence chars
to identify potential sentence endings.| Constructor and Description |
|---|
DefaultEndOfSentenceScanner(char[] eosCharacters)
Initializes the current instance.
|
| Modifier and Type | Method and Description |
|---|---|
char[] |
getEndOfSentenceCharacters()
Returns an array of character which can indicate the end of a sentence.
|
List<Integer> |
getPositions(char[] cbuf)
The receiver scans `cbuf' for sentence ending characters and
returns their offsets.
|
List<Integer> |
getPositions(String s)
The receiver scans the specified string for sentence ending characters and
returns their offsets.
|
List<Integer> |
getPositions(StringBuffer buf)
The receiver scans `buf' for sentence ending characters and
returns their offsets.
|
public DefaultEndOfSentenceScanner(char[] eosCharacters)
eosCharacters - public List<Integer> getPositions(String s)
EndOfSentenceScannergetPositions in interface EndOfSentenceScanners - a String valueList of Integer objects.public List<Integer> getPositions(StringBuffer buf)
EndOfSentenceScannergetPositions in interface EndOfSentenceScannerbuf - a StringBuffer valueList of Integer objects.public List<Integer> getPositions(char[] cbuf)
EndOfSentenceScannergetPositions in interface EndOfSentenceScannercbuf - a char[] valueList of Integer objects.public char[] getEndOfSentenceCharacters()
EndOfSentenceScannergetEndOfSentenceCharacters in interface EndOfSentenceScannerCopyright © 2017 The Apache Software Foundation. All rights reserved.