kylm.model.ngram.smoother
Class WBSmoother

java.lang.Object
  extended by kylm.model.ngram.smoother.NgramSmoother
      extended by kylm.model.ngram.smoother.WBSmoother
All Implemented Interfaces:
java.io.Serializable

public class WBSmoother
extends NgramSmoother

Calculate N-gram probabilities with Witten-Bell smoothing

Author:
neubig
See Also:
Serialized Form

Constructor Summary
WBSmoother()
          Create a smoother and estimate the discounts automatically when it comes time to smooth
 
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

WBSmoother

public WBSmoother()
Create a smoother and estimate the discounts automatically when it comes time to smooth

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.

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