public class DefaultPOSContextGenerator extends java.lang.Object implements POSContextGenerator
| Constructor and Description |
|---|
DefaultPOSContextGenerator(Dictionary dict)
Initializes the current instance.
|
DefaultPOSContextGenerator(int cacheSize,
Dictionary dict)
Initializes the current instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String[] |
getContext(int index,
java.lang.Object[] tokens,
java.lang.String[] tags)
Returns the context for making a pos tag decision at the specified token index
given the specified tokens and previous tags.
|
java.lang.String[] |
getContext(int index,
java.lang.String[] sequence,
java.lang.String[] priorDecisions,
java.lang.Object[] additionalContext)
Returns the context for the specified position in the specified sequence (list).
|
public DefaultPOSContextGenerator(Dictionary dict)
dict - public DefaultPOSContextGenerator(int cacheSize,
Dictionary dict)
cacheSize - dict - public java.lang.String[] getContext(int index,
java.lang.String[] sequence,
java.lang.String[] priorDecisions,
java.lang.Object[] additionalContext)
BeamSearchContextGeneratorgetContext in interface POSContextGeneratorgetContext in interface BeamSearchContextGenerator<java.lang.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 java.lang.String[] getContext(int index,
java.lang.Object[] tokens,
java.lang.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.Copyright © 2010 - 2023 Adobe. All Rights Reserved