Package opennlp.tools.sentdetect
Class DefaultEndOfSentenceScanner
java.lang.Object
opennlp.tools.sentdetect.DefaultEndOfSentenceScanner
- All Implemented Interfaces:
- EndOfSentenceScanner
Default implementation of the 
EndOfSentenceScanner.
 It uses a character array with possible end of sentence chars
 to identify potential sentence endings.- 
Constructor SummaryConstructorsConstructorDescriptionDefaultEndOfSentenceScanner(char[] eosCharacters) Initializes the current instance.
- 
Method SummaryModifier and TypeMethodDescriptiongetPositions(char[] cbuf) The receiver scanscbuffor sentence ending characters and returns their offsets.The receiver scans the specified string for sentence ending characters and returns their offsets.getPositions(StringBuffer buf) The receiver scansbuffor sentence ending characters and returns their offsets.
- 
Constructor Details- 
DefaultEndOfSentenceScannerpublic DefaultEndOfSentenceScanner(char[] eosCharacters) Initializes the current instance.- Parameters:
- eosCharacters- The characters to be used to detect sentence endings.
 
 
- 
- 
Method Details- 
getPositionsDescription copied from interface:EndOfSentenceScannerThe receiver scans the specified string for sentence ending characters and returns their offsets.- Specified by:
- getPositionsin interface- EndOfSentenceScanner
- Parameters:
- s- A- CharSequenceto be scanned.
- Returns:
- A Listof Integer objects.
 
- 
getPositionsDescription copied from interface:EndOfSentenceScannerThe receiver scansbuffor sentence ending characters and returns their offsets.- Specified by:
- getPositionsin interface- EndOfSentenceScanner
- Parameters:
- buf- A- StringBufferto be scanned.
- Returns:
- A Listof Integer objects.
 
- 
getPositionsDescription copied from interface:EndOfSentenceScannerThe receiver scanscbuffor sentence ending characters and returns their offsets.- Specified by:
- getPositionsin interface- EndOfSentenceScanner
- Parameters:
- cbuf- A- char[]to be scanned.
- Returns:
- A Listof Integer objects.
 
- 
getEOSCharacters- Specified by:
- getEOSCharactersin interface- EndOfSentenceScanner
- Returns:
- a set of characterswhich can indicate the end of a sentence.
 
 
-