kylm.model.ngram.smoother
Class AbsoluteSmoother
java.lang.Object
kylm.model.ngram.smoother.NgramSmoother
kylm.model.ngram.smoother.AbsoluteSmoother
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- KNSmoother
public class AbsoluteSmoother
- extends NgramSmoother
Calculate N-gram probabilities with absolute smoothing
- Author:
- neubig
- See Also:
- Serialized Form
|
Constructor Summary |
AbsoluteSmoother()
Create a smoother and estimate the discounts automatically when it comes
time to smooth |
AbsoluteSmoother(float[] discounts)
Create a smoother with pre-set discounts |
|
Method Summary |
java.lang.String |
getAbbr()
|
java.lang.String |
getName()
|
void |
smooth(NgramLM lm)
Smooth all the n-gram probabilities in a language model according to
the appropriate smoothing algorithm. |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbsoluteSmoother
public AbsoluteSmoother()
- Create a smoother and estimate the discounts automatically when it comes
time to smooth
AbsoluteSmoother
public AbsoluteSmoother(float[] discounts)
- Create a smoother with pre-set discounts
- Parameters:
discounts - The discounts to use
smooth
public void smooth(NgramLM lm)
- Description copied from class:
NgramSmoother
- Smooth all the n-gram probabilities in a language model according to
the appropriate smoothing algorithm.
- Specified by:
smooth in class NgramSmoother
- Parameters:
lm - The N-gram language model to smooth.
getAbbr
public java.lang.String getAbbr()
- Specified by:
getAbbr in class NgramSmoother
- Returns:
- The abbreviation given to this type of smoothing
getName
public java.lang.String getName()
- Specified by:
getName in class NgramSmoother
- Returns:
- The name of this type of smoothing