Package opennlp.tools.sentdetect
Class DefaultSDContextGenerator
- java.lang.Object
- 
- opennlp.tools.sentdetect.DefaultSDContextGenerator
 
- 
- All Implemented Interfaces:
- SDContextGenerator
 - Direct Known Subclasses:
- SentenceContextGenerator
 
 public class DefaultSDContextGenerator extends Object implements SDContextGenerator Generate event contexts for maxent decisions for sentence detection.
- 
- 
Constructor SummaryConstructors Constructor Description DefaultSDContextGenerator(char[] eosCharacters)Creates a newSDContextGeneratorinstance with no induced abbreviations.DefaultSDContextGenerator(Set<String> inducedAbbreviations, char[] eosCharacters)Creates a newSDContextGeneratorinstance which uses the set of induced abbreviations.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]getContext(CharSequence sb, int position)Returns an array of contextual features for the potential sentence boundary at the specified position within the specified string buffer.
 
- 
- 
- 
Constructor Detail- 
DefaultSDContextGeneratorpublic DefaultSDContextGenerator(char[] eosCharacters) Creates a newSDContextGeneratorinstance with no induced abbreviations.- Parameters:
- eosCharacters-
 
 - 
DefaultSDContextGeneratorpublic DefaultSDContextGenerator(Set<String> inducedAbbreviations, char[] eosCharacters) Creates a newSDContextGeneratorinstance which uses the set of induced abbreviations.- Parameters:
- inducedAbbreviations- a- Setof Strings representing induced abbreviations in the training data. Example: "Mr."
- eosCharacters-
 
 
- 
 - 
Method Detail- 
getContextpublic String[] getContext(CharSequence sb, int position) Description copied from interface:SDContextGeneratorReturns an array of contextual features for the potential sentence boundary at the specified position within the specified string buffer.- Specified by:
- getContextin interface- SDContextGenerator
- Parameters:
- sb- The- Stringfor which sentences are being determined.
- position- An index into the specified string buffer when a sentence boundary may occur.
- Returns:
- an array of contextual features for the potential sentence boundary at the specified position within the specified string buffer.
 
 
- 
 
-