public class DefaultSDContextGenerator extends java.lang.Object implements SDContextGenerator
| Constructor and Description |
|---|
DefaultSDContextGenerator(char[] eosCharacters)
Creates a new
SDContextGenerator instance with
no induced abbreviations. |
DefaultSDContextGenerator(java.util.Set<java.lang.String> inducedAbbreviations,
char[] eosCharacters)
Creates a new
SDContextGenerator instance which uses
the set of induced abbreviations. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String[] |
getContext(java.lang.CharSequence sb,
int position)
Returns an array of contextual features for the potential sentence boundary at the
specified position within the specified string buffer.
|
public DefaultSDContextGenerator(char[] eosCharacters)
SDContextGenerator instance with
no induced abbreviations.eosCharacters - public DefaultSDContextGenerator(java.util.Set<java.lang.String> inducedAbbreviations,
char[] eosCharacters)
SDContextGenerator instance which uses
the set of induced abbreviations.inducedAbbreviations - a Set of Strings
representing induced abbreviations in the training data.
Example: "Mr."eosCharacters - public java.lang.String[] getContext(java.lang.CharSequence sb,
int position)
SDContextGeneratorgetContext in interface SDContextGeneratorsb - The String for which sentences are being determined.position - An index into the specified string buffer when a sentence boundary may occur.Copyright © 2010 - 2020 Adobe. All Rights Reserved