|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--edu.stanford.nlp.mt.ATable
|
+--edu.stanford.nlp.mt.ATableHMM
| Constructor Summary | |
ATableHMM()
|
|
ATableHMM(int maxsize)
|
|
| Method Summary | |
boolean |
checkOK()
|
boolean |
checkOK(int len)
Check OK for a specifi length len |
double |
DKL(ATable a1)
|
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)
Smooth the basic probability if smoothUniform is on |
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 |
float |
getProbJump(int distance)
Get the prior probability of jumping a distance distance |
void |
incCount(int distance,
float cnt)
Increment the count for a jump of distance distance |
void |
incCount(int i,
int i_prev,
int l,
double val1)
Increment the corresponding counts |
void |
incCountInitPos(int i,
float cnt)
Increment the count for an initial jump to position I |
void |
incEmpty(float cnt)
Increment the count for a zero jump with cnt |
void |
initialize(ATable a1)
|
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 from the counts in initialCounts This assumes we already have pEmpty calculated from params First, normalizes initialCounts so that p(1)+ ..p(MAX_LENGTH)+p0 is 1 |
void |
normalizeProbArr()
Normalize the transition table prob_arr and put the appropriate probabilities there |
void |
printBasicProbs()
|
void |
printProbs()
|
void |
read(String filename)
reading the jump probabilities and initializing |
void |
save(String filename)
Saving just the jump probabilities |
void |
zeroCounts()
Before starting a new iteration the counts should be zero-ed |
| Methods inherited from class edu.stanford.nlp.mt.ATable |
getCount, getProb, incCount, incCount |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ATableHMM(int maxsize)
public ATableHMM()
| Method Detail |
public float getInitialProb(int index,
int l)
public boolean isPopulated()
isPopulated in class ATable
public float getProbHMM(int i,
int i_prev,
int l)
public float getProb(int i,
int i_prev,
int l)
getProb in class ATable
public void incCount(int i,
int i_prev,
int l,
double val1)
incCount in class ATable
public void incCount(int distance,
float cnt)
public float getProbJump(int distance)
public void incEmpty(float cnt)
public void incCountInitPos(int i,
float cnt)
public void normalizeInitialProbs()
public void zeroCounts()
public void normalizeProbArr()
public void normalize()
normalize in class ATablepublic void initializeUniform()
initializeUniform in class ATablepublic void initialize(ATable a1)
initialize in class ATablepublic float getEmpty()
getEmpty in class ATablepublic boolean checkOK()
checkOK in class ATablepublic boolean checkOK(int len)
public void printProbs()
printProbs in class ATablepublic void printBasicProbs()
public float Mabs(float x)
public static void main(String[] args)
public void save(String filename)
save in class ATablepublic void read(String filename)
public double DKL(ATable a1)
DKL in class ATable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||