Package opennlp.tools.sentdetect
Interface EndOfSentenceScanner
-
- All Known Implementing Classes:
DefaultEndOfSentenceScanner
public interface EndOfSentenceScannerScansCharSequence,StringBuffer, andchar[]for the offsets of sentence ending characters.Implementations of this interface can use regular expressions, hand-coded DFAs, and other scanning techniques to locate end of sentence offsets.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description char[]getEndOfSentenceCharacters()Deprecated.Set<Character>getEOSCharacters()List<Integer>getPositions(char[] cbuf)The receiver scanscbuffor sentence ending characters and returns their offsets.List<Integer>getPositions(CharSequence s)The receiver scans the specified string for sentence ending characters and returns their offsets.List<Integer>getPositions(StringBuffer buf)The receiver scansbuffor sentence ending characters and returns their offsets.
-
-
-
Method Detail
-
getEndOfSentenceCharacters
@Deprecated char[] getEndOfSentenceCharacters()
Deprecated.- Returns:
- an array of character which can indicate the end of a sentence.
-
getEOSCharacters
Set<Character> getEOSCharacters()
- Returns:
- a set of
characterswhich can indicate the end of a sentence.
-
getPositions
List<Integer> getPositions(CharSequence s)
The receiver scans the specified string for sentence ending characters and returns their offsets.- Parameters:
s- ACharSequenceto be scanned.- Returns:
- A
Listof Integer objects.
-
getPositions
List<Integer> getPositions(StringBuffer buf)
The receiver scansbuffor sentence ending characters and returns their offsets.- Parameters:
buf- AStringBufferto be scanned.- Returns:
- A
Listof Integer objects.
-
-