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()
Deprecated.
|
Set<Character> |
getEOSCharacters()
Returns a set 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)
EndOfSentenceScanner
getPositions
in interface EndOfSentenceScanner
s
- a String
valueList
of Integer objects.public List<Integer> getPositions(StringBuffer buf)
EndOfSentenceScanner
getPositions
in interface EndOfSentenceScanner
buf
- a StringBuffer
valueList
of Integer objects.public List<Integer> getPositions(char[] cbuf)
EndOfSentenceScanner
getPositions
in interface EndOfSentenceScanner
cbuf
- a char[]
valueList
of Integer objects.@Deprecated public char[] getEndOfSentenceCharacters()
EndOfSentenceScanner
getEndOfSentenceCharacters
in interface EndOfSentenceScanner
public Set<Character> getEOSCharacters()
EndOfSentenceScanner
getEOSCharacters
in interface EndOfSentenceScanner
Copyright © 2018 The Apache Software Foundation. All rights reserved.