|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object opennlp.tools.postag.DefaultPOSContextGenerator
public class DefaultPOSContextGenerator
A context generator for the POS Tagger.
Field Summary | |
---|---|
protected String |
SB
|
protected String |
SE
|
Constructor Summary | |
---|---|
DefaultPOSContextGenerator(Dictionary dict)
Initializes the current instance. |
|
DefaultPOSContextGenerator(int cacheSize,
Dictionary dict)
Initializes the current instance. |
Method Summary | |
---|---|
String[] |
getContext(int index,
Object[] tokens,
String[] tags)
Returns the context for making a pos tag decision at the specified token index given the specified tokens and previous tags. |
String[] |
getContext(int index,
String[] sequence,
String[] priorDecisions,
Object[] additionalContext)
Returns the context for the specified position in the specified sequence (list). |
protected static String[] |
getPrefixes(String lex)
|
protected static String[] |
getSuffixes(String lex)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final String SE
protected final String SB
Constructor Detail |
---|
public DefaultPOSContextGenerator(Dictionary dict)
dict
- public DefaultPOSContextGenerator(int cacheSize, Dictionary dict)
cacheSize
- dict
- Method Detail |
---|
protected static String[] getPrefixes(String lex)
protected static String[] getSuffixes(String lex)
public String[] getContext(int index, String[] sequence, String[] priorDecisions, Object[] additionalContext)
BeamSearchContextGenerator
getContext
in interface POSContextGenerator
getContext
in interface BeamSearchContextGenerator<String>
index
- The index of the sequence.sequence
- The sequence of items over which the beam search is performed.priorDecisions
- The sequence of decisions made prior to the context for which this decision is being made.additionalContext
- Any addition context specific to a class implementing this interface.
public String[] getContext(int index, Object[] tokens, String[] tags)
index
- The index of the token for which the context is provided.tokens
- The tokens in the sentence.tags
- The tags assigned to the previous words in the sentence.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |