|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectopennlp.tools.sentdetect.DefaultSDContextGenerator
public class DefaultSDContextGenerator
Generate event contexts for maxent decisions for sentence detection.
| Field Summary | |
|---|---|
protected java.lang.StringBuffer |
buf
String buffer for generating features. |
protected java.util.List |
collectFeats
List for holding features as they are generated. |
| Constructor Summary | |
|---|---|
DefaultSDContextGenerator(char[] eosCharacters)
Creates a new SDContextGenerator instance with
no induced abbreviations. |
|
DefaultSDContextGenerator(java.util.Set inducedAbbreviations,
char[] eosCharacters)
Creates a new SDContextGenerator instance which uses
the set of induced abbreviations. |
|
| Method Summary | |
|---|---|
protected void |
collectFeatures(java.lang.String prefix,
java.lang.String suffix,
java.lang.String previous,
java.lang.String next)
Determines some of the features for the sentence detector and adds them to list features. |
java.lang.String[] |
getContext(java.lang.StringBuffer sb,
int position)
Returns an array of contextual features for the potential sentence boundary at the specified position within the specified string buffer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.StringBuffer buf
protected java.util.List collectFeats
| Constructor Detail |
|---|
public DefaultSDContextGenerator(char[] eosCharacters)
SDContextGenerator instance with
no induced abbreviations.
eosCharacters -
public DefaultSDContextGenerator(java.util.Set 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 - | Method Detail |
|---|
public java.lang.String[] getContext(java.lang.StringBuffer sb,
int position)
SDContextGenerator
getContext in interface SDContextGeneratorsb - The string buffer for which sentences are being determined.position - An index into the specified string buffer when a sentence boundary may occur.
protected void collectFeatures(java.lang.String prefix,
java.lang.String suffix,
java.lang.String previous,
java.lang.String next)
prefix - String preceeding the eos character in the eos token.suffix - String following the eos character in the eos token.previous - Space delimited token preceeding token containing eos character.next - Space delimited token following token containsing eos character.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||