kylm.model.ngram.smoother
Class NgramSmoother

java.lang.Object
  extended by 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

Constructor Summary
NgramSmoother()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
abstract  java.lang.String getAbbr()
           
 int[] getCutoffs()
           
 int getDebugLevel()
           
abstract  java.lang.String getName()
           
 boolean getSmoothUnigrams()
           
 void setCutoffs(int[] cutoffs)
           
 void setDebugLevel(int debug)
           
 void setSmoothUnigrams(boolean smoothUnigram)
           
abstract  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
 

Constructor Detail

NgramSmoother

public NgramSmoother()
Method Detail

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