edu.stanford.nlp.mt
Class TPHandlerNM

java.lang.Object
  |
  +--edu.stanford.nlp.mt.TPHandler
        |
        +--edu.stanford.nlp.mt.TPHandlerNM

public class TPHandlerNM
extends TPHandler

This is for use in the model with special null treatment p(fj|null,alignment)=alfa*p(fj|fj+1) +(1-alfa)*p(fj|NULL)


Field Summary
protected  ProbCountHolder[][] cache
           
protected  ProbCountHolder[][] cache_nulls
           
protected  IntPair tmpPair
           
 
Constructor Summary
TPHandlerNM()
           
TPHandlerNM(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

cache_nulls

protected ProbCountHolder[][] cache_nulls

tmpPair

protected IntPair tmpPair
Constructor Detail

TPHandlerNM

public TPHandlerNM()

TPHandlerNM

public TPHandlerNM(TTable tTable)
Method Detail

setPair

public void setPair(SentencePair sent)
Overrides:
setPair in class TPHandler

init

public void init()
Overrides:
init in class TPHandler

getProb

public double getProb(int i,
                      int j)
Overrides:
getProb in class TPHandler

getProb

public double getProb(int i,
                      int j,
                      int[] alignment)
Overrides:
getProb in class TPHandler

incCount

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

Overrides:
incCount in class TPHandler


Stanford NLP Group