kylm.model.ngram.smoother
Class GTSmoother

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

public class GTSmoother
extends NgramSmoother

Calculate N-gram probabilities with Katz smoothing TODO: This is not statistically sound when trimming

Author:
neubig
See Also:
Serialized Form

Constructor Summary
GTSmoother()
          Create a smoother and estimate the discounts automatically when it comes time to smooth
 
Method Summary
 java.lang.String getAbbr()
           
 int getK()
           
 java.lang.String getName()
           
 void process(NgramLM lm, NgramNode node, float[] discounted, int i, int lev)
           
 void setK(int k)
           
 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

GTSmoother

public GTSmoother()
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.

process

public void process(NgramLM lm,
                    NgramNode node,
                    float[] discounted,
                    int i,
                    int lev)

setK

public void setK(int k)

getK

public int getK()

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