Jet.HMM
Class HMMemitter

java.lang.Object
  extended byJet.HMM.HMMemitter
Direct Known Subclasses:
BasicHMMemitter, BigramHMMemitter, SuffixHMMemitter, WordFeatureHMMemitter

public abstract class HMMemitter
extends java.lang.Object

this abstract class specifies the methods required for any class which computes the emission probabilities for an HMM.


Field Summary
 HMM hmm
           
 java.lang.String stateName
           
 
Constructor Summary
HMMemitter()
           
 
Method Summary
abstract  void computeProbabilities()
          computate probabilities of emission from counts.
abstract  double getProbability(java.lang.String token, java.lang.String priorToken, FeatureSet fs)
          returns the probability that the current HMM state will emit token token with FeatureSet fs.
abstract  void print()
          print the information about emission from this state to System.out.
abstract  void resetForTraining()
          initialize the emitter prior to training.
 void setCacheCount(java.lang.String type, int n)
           
abstract  void store(java.io.PrintWriter stream)
          write the information about emission from this state in a form which can be read by HMM.load(java.io.Reader).
abstract  void trainOnInstances(java.lang.String token, java.lang.String priorToken, int n)
          update emission counts to indicate that String token appeared n times as an output of the current state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hmm

public HMM hmm

stateName

public java.lang.String stateName
Constructor Detail

HMMemitter

public HMMemitter()
Method Detail

resetForTraining

public abstract void resetForTraining()
initialize the emitter prior to training. This method should be called before any calls on trainOnInstances(java.lang.String, java.lang.String, int).


trainOnInstances

public abstract void trainOnInstances(java.lang.String token,
                                      java.lang.String priorToken,
                                      int n)
update emission counts to indicate that String token appeared n times as an output of the current state.


computeProbabilities

public abstract void computeProbabilities()
computate probabilities of emission from counts. This method will be called after all calls on trainOnInstances(java.lang.String, java.lang.String, int) and before calls on getProbability(java.lang.String, java.lang.String, Jet.Lisp.FeatureSet).


getProbability

public abstract double getProbability(java.lang.String token,
                                      java.lang.String priorToken,
                                      FeatureSet fs)
returns the probability that the current HMM state will emit token token with FeatureSet fs.


setCacheCount

public void setCacheCount(java.lang.String type,
                          int n)

print

public abstract void print()
print the information about emission from this state to System.out.


store

public abstract void store(java.io.PrintWriter stream)
write the information about emission from this state in a form which can be read by HMM.load(java.io.Reader).