kylm.model.ngram.smoother
Class KNSmoother

java.lang.Object
  extended by kylm.model.ngram.smoother.NgramSmoother
      extended by kylm.model.ngram.smoother.AbsoluteSmoother
          extended by kylm.model.ngram.smoother.KNSmoother
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
MKNSmoother

public class KNSmoother
extends AbsoluteSmoother

Calculate N-gram probabilities with Kneser-Ney smoothing

Author:
neubig
See Also:
Serialized Form

Constructor Summary
KNSmoother()
           
 
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 kylm.model.ngram.smoother.NgramSmoother
equals, getCutoffs, getDebugLevel, getSmoothUnigrams, setCutoffs, setDebugLevel, setSmoothUnigrams
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KNSmoother

public KNSmoother()
Method Detail

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.

Overrides:
smooth in class AbsoluteSmoother
Parameters:
lm - The N-gram language model to smooth.

getName

public java.lang.String getName()
Overrides:
getName in class AbsoluteSmoother
Returns:
The name of this type of smoothing

getAbbr

public java.lang.String getAbbr()
Overrides:
getAbbr in class AbsoluteSmoother
Returns:
The abbreviation given to this type of smoothing