Package opennlp.tools.sentdetect.lang.th
Class SentenceContextGenerator
java.lang.Object
opennlp.tools.sentdetect.DefaultSDContextGenerator
opennlp.tools.sentdetect.lang.th.SentenceContextGenerator
- All Implemented Interfaces:
SDContextGenerator
Creates contexts/features for end-of-sentence detection in Thai text.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcollectFeatures(List<String> collectFeats, StringBuilder buf, String prefix, String suffix, String previous, String next, Character eosChar) Determines some features for the sentence detector and adds them to list features.Methods inherited from class opennlp.tools.sentdetect.DefaultSDContextGenerator
getContext
-
Field Details
-
eosCharacters
public static final char[] eosCharacters
-
-
Constructor Details
-
SentenceContextGenerator
public SentenceContextGenerator()
-
-
Method Details
-
collectFeatures
protected void collectFeatures(List<String> collectFeats, StringBuilder buf, String prefix, String suffix, String previous, String next, Character eosChar) Description copied from class:DefaultSDContextGeneratorDetermines some features for the sentence detector and adds them to list features.- Overrides:
collectFeaturesin classDefaultSDContextGenerator- Parameters:
collectFeats- The list to collect features into.buf- A reusable string builder for feature construction.prefix- String preceding theeosCharin the eos token.suffix- String following theeosCharin the eos token.previous- Space delimited token preceding token containingeosChar.next- Space delimited token following token containingeosChar.eosChar- The EOS character being analyzed.
-