edu.stanford.nlp.mt
Class ATableHMMFull

java.lang.Object
  |
  +--edu.stanford.nlp.mt.ATable
        |
        +--edu.stanford.nlp.mt.ATableHMMFull

public class ATableHMMFull
extends ATable

The purpose of this class is to hold counts and alignment probabilities for an HMM p(aj|aj-1,l) . In contrast to ATableHMM, here there are no common jump parameters but rather we have seprate p(aj|aj-1,l). We also do the trick for p(0|i,l) which is modelled as p(i+l|i,l) to remember the word after which the empty word followed


Constructor Summary
ATableHMMFull(int maxsize)
           
 
Method Summary
 boolean checkOK()
           
 boolean checkOK(int len)
          Check OK for a specific length len
 float getEmpty()
           
 float getInitialProb(int index, int l)
          Get the initial probability p(i|l) i is in 0..l , l is the length of the english sentence
 float getProb(int i, int i_prev, int l)
           
 float getProbHMM(int i, int i_prev, int l)
          Get the probability p(i|i_prev,l) i is from 1 to 2L and i_prev is in the same set as well
 void incCount(int i, int i_prev, int l, double val1)
          Increment the corresponding counts
 void initialize(ATable a)
           
 void initializeUniform()
          Initialize the probabilities in a brain dead manner uniformly
 boolean isPopulated()
           
 float Mabs(float x)
           
static void main(String[] args)
          Some code to test the class;
 void normalize()
          This does the normalization of the component distributions
 void normalizeInitialProbs()
          Calculate normalized initial parameters No reason really why it should be separate from normalizeProbArr except for the empty parameters
 void normalizeProbArr()
          Normalize the transition table prob_arr and put the appropriate probabilities there
 void printProbs()
           
 void zeroCounts()
          Before starting a new iteration the counts should be zero-ed
 
Methods inherited from class edu.stanford.nlp.mt.ATable
DKL, getCount, getProb, incCount, incCount, save
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ATableHMMFull

public ATableHMMFull(int maxsize)
Method Detail

getInitialProb

public float getInitialProb(int index,
                            int l)
Get the initial probability p(i|l) i is in 0..l , l is the length of the english sentence


getEmpty

public float getEmpty()
Overrides:
getEmpty in class ATable

isPopulated

public boolean isPopulated()
Overrides:
isPopulated in class ATable

getProbHMM

public float getProbHMM(int i,
                        int i_prev,
                        int l)
Get the probability p(i|i_prev,l) i is from 1 to 2L and i_prev is in the same set as well


getProb

public float getProb(int i,
                     int i_prev,
                     int l)
Overrides:
getProb in class ATable

incCount

public void incCount(int i,
                     int i_prev,
                     int l,
                     double val1)
Increment the corresponding counts

Overrides:
incCount in class ATable

normalizeInitialProbs

public void normalizeInitialProbs()
Calculate normalized initial parameters No reason really why it should be separate from normalizeProbArr except for the empty parameters


zeroCounts

public void zeroCounts()
Before starting a new iteration the counts should be zero-ed


normalizeProbArr

public void normalizeProbArr()
Normalize the transition table prob_arr and put the appropriate probabilities there


normalize

public void normalize()
This does the normalization of the component distributions

Overrides:
normalize in class ATable

initializeUniform

public void initializeUniform()
Initialize the probabilities in a brain dead manner uniformly

Overrides:
initializeUniform in class ATable

initialize

public void initialize(ATable a)
Overrides:
initialize in class ATable

checkOK

public boolean checkOK()
Overrides:
checkOK in class ATable

checkOK

public boolean checkOK(int len)
Check OK for a specific length len


main

public static void main(String[] args)
Some code to test the class;


printProbs

public void printProbs()
Overrides:
printProbs in class ATable

Mabs

public float Mabs(float x)


Stanford NLP Group