edu.stanford.nlp.classify
Class AddEpsilonSmoother

java.lang.Object
  |
  +--edu.stanford.nlp.classify.AddEpsilonSmoother
All Implemented Interfaces:
SmootherB

public class AddEpsilonSmoother
extends Object
implements SmootherB

Smooths a ProbabilitySet using a HashMap vocabulary. It also converts counts into probabilities


Constructor Summary
AddEpsilonSmoother(ProbabilitySet unsmoothed, HashMap vocab, double epsilon)
          unsmoothed is a set of unsmoothed probabilities, and vocab is a hash table that contains all of the vocabulary words seen in that set
 
Method Summary
 ProbabilitySet smooth()
          This method smooths the probability set by adding one to all of the counts seen in the probability set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddEpsilonSmoother

public AddEpsilonSmoother(ProbabilitySet unsmoothed,
                          HashMap vocab,
                          double epsilon)
unsmoothed is a set of unsmoothed probabilities, and vocab is a hash table that contains all of the vocabulary words seen in that set

Method Detail

smooth

public ProbabilitySet smooth()
This method smooths the probability set by adding one to all of the counts seen in the probability set. The vocabulary list my_vocab allows words that have not been seen to be added to each class probability with a count of one.

Specified by:
smooth in interface SmootherB


Stanford NLP Group