public interface ContextualSmoother
A contextual smoother computes the contextually smoothed probabability of a word given a part of speech tag, e.g., p( word | tag ).
Modifier and Type | Method and Description |
---|---|
int |
cachedProbabilitiesCount()
Get the number of cached contextual probabilities.
|
void |
clearCachedProbabilities()
Clear cached probabilities..
|
Probability |
contextualProbability(java.lang.String tag,
java.lang.String previousTag)
Compute smoothed contextual probability of a tag given the previous tag.
|
Probability |
contextualProbability(java.lang.String tag,
java.lang.String previousTag,
java.lang.String previousPreviousTag)
Compute smoothed contextual probability of a tag given the previous tags.
|
void |
setPartOfSpeechTagger(PartOfSpeechTagger posTagger)
Set the part of speech tagger for this smoother.
|
void setPartOfSpeechTagger(PartOfSpeechTagger posTagger)
posTagger
- Part of speech tagger for which
this smoother provides probabilities.int cachedProbabilitiesCount()
void clearCachedProbabilities()
Probability contextualProbability(java.lang.String tag, java.lang.String previousTag)
tag
- The current tag.previousTag
- The previous tag.Probability contextualProbability(java.lang.String tag, java.lang.String previousTag, java.lang.String previousPreviousTag)
tag
- The current tag.previousTag
- The previous tag.previousPreviousTag
- The previous tag of the previous tag.