public class AdditiveLexicalSmoother extends AbstractLexicalSmoother implements LexicalSmoother
A lexical smoother which adds a small positive value to each (word, tag) count to avoid zero probabilities. When the value added is 1, this is Laplace smoothing. When the value added is 0.5, this is Lidstone smoothing.
This implementation uses 0.5 as the adjustment value (Lidstone smoothing).
| Modifier and Type | Field and Description |
|---|---|
protected double |
additiveAdjustmentValue
Additive adjustment value = 0.5 (Lidstone smoothing).
|
protected boolean |
debug
True if debugging enabled.
|
cachedLexicalProbabilities, logger, partOfSpeechTagger| Constructor and Description |
|---|
AdditiveLexicalSmoother()
Create an additive lexical smoother.
|
| Modifier and Type | Method and Description |
|---|---|
Probability |
lexicalProbability(java.lang.String word,
java.lang.String tag)
Get lexically smoothed probability of a word given a tag.
|
cachedProbabilitiesCount, clearCachedProbabilities, getLogger, setLogger, setPartOfSpeechTaggercloseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcachedProbabilitiesCount, clearCachedProbabilities, setPartOfSpeechTaggerprotected boolean debug
protected double additiveAdjustmentValue
public AdditiveLexicalSmoother()
public Probability lexicalProbability(java.lang.String word, java.lang.String tag)
lexicalProbability in interface LexicalSmootherlexicalProbability in class AbstractLexicalSmootherword - The word.tag - The part of speech tag.