Package opennlp.tools.sentdetect
Klasse DefaultSDContextGenerator
java.lang.Object
opennlp.tools.sentdetect.DefaultSDContextGenerator
- Alle implementierten Schnittstellen:
SDContextGenerator
- Bekannte direkte Unterklassen:
SentenceContextGenerator
Generate event contexts for maxent decisions for sentence detection.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungDefaultSDContextGenerator(char[] eosCharacters) Creates a new instance with no induced abbreviations.DefaultSDContextGenerator(Set<String> inducedAbbreviations, char[] eosCharacters) Creates a newSDContextGeneratorinstance which uses the set of induced abbreviations. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungString[]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.
-
Konstruktordetails
-
DefaultSDContextGenerator
public DefaultSDContextGenerator(char[] eosCharacters) Creates a new instance with no induced abbreviations.- Parameter:
eosCharacters- The characters to be used to detect sentence endings.
-
DefaultSDContextGenerator
Creates a newSDContextGeneratorinstance which uses the set of induced abbreviations.- Parameter:
inducedAbbreviations- aSetof Strings representing induced abbreviations in the training data. Example: "Mr."eosCharacters- The characters to be used to detect sentence endings.
-
-
Methodendetails
-
getContext
Beschreibung aus Schnittstelle kopiert:SDContextGeneratorReturns an array of contextual features for the potential sentence boundary at the specified position within the specified string buffer.- Angegeben von:
getContextin SchnittstelleSDContextGenerator- Parameter:
sb- TheStringfor which sentences are being determined.position- An index into the specified string buffer when a sentence boundary may occur.- Gibt zurück:
- an array of contextual features for the potential sentence boundary at the
specified
positionwithin the specified string buffer.
-