kylm.model.ngram.smoother
Class NgramSmoother
java.lang.Object
kylm.model.ngram.smoother.NgramSmoother
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- AbsoluteSmoother, GTSmoother, MLSmoother, WBSmoother
public abstract class NgramSmoother
- extends java.lang.Object
- implements java.io.Serializable
An abstract class that defines an algorithm to smooth an n-gram model
- Author:
- neubig
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NgramSmoother
public NgramSmoother()
smooth
public abstract void smooth(NgramLM lm)
- Smooth all the n-gram probabilities in a language model according to
the appropriate smoothing algorithm.
- Parameters:
lm
- The N-gram language model to smooth.
setSmoothUnigrams
public void setSmoothUnigrams(boolean smoothUnigram)
getSmoothUnigrams
public boolean getSmoothUnigrams()
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
getDebugLevel
public int getDebugLevel()
setDebugLevel
public void setDebugLevel(int debug)
getCutoffs
public int[] getCutoffs()
setCutoffs
public void setCutoffs(int[] cutoffs)
getName
public abstract java.lang.String getName()
- Returns:
- The name of this type of smoothing
getAbbr
public abstract java.lang.String getAbbr()
- Returns:
- The abbreviation given to this type of smoothing