edu.stanford.nlp.mt
Class TPHandler

java.lang.Object
  |
  +--edu.stanford.nlp.mt.TPHandler
Direct Known Subclasses:
TPHandlerEtags, TPHandlerFE1, TPHandlerNM, TPHandlerNULL

public class TPHandler
extends Object

Writing separate classes to handle the translation probabilities with or without tags; these classes take care of the caching and reduce the mess in the em_loops in the models. Trying to obviate the need for too many different em_loop methods


Field Summary
protected  ProbCountHolder[][] cache
           
protected  IntPair tmpPair
           
 
Constructor Summary
TPHandler()
           
TPHandler(TTable tTable)
           
 
Method Summary
 double getProb(int i, int j)
           
 double getProb(int i, int j, int[] alignment)
           
 void incCount(int i, int j, double val)
          Increment the count for c(fj|ei)
 void init()
           
 void setPair(SentencePair sent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

protected ProbCountHolder[][] cache

tmpPair

protected IntPair tmpPair
Constructor Detail

TPHandler

public TPHandler()

TPHandler

public TPHandler(TTable tTable)
Method Detail

setPair

public void setPair(SentencePair sent)

init

public void init()

getProb

public double getProb(int i,
                      int j)

getProb

public double getProb(int i,
                      int j,
                      int[] alignment)

incCount

public void incCount(int i,
                     int j,
                     double val)
Increment the count for c(fj|ei)



Stanford NLP Group