public class FactorTable
extends java.lang.Object
Constructor and Description |
---|
FactorTable(FactorTable t) |
FactorTable(int numClasses,
int windowSize) |
Modifier and Type | Method and Description |
---|---|
double |
conditionalLogProbGivenFirst(int given,
int[] of)
Computes the probability of the sequence OF being at the end of the table
given that the first tag in table is GIVEN.
|
double |
conditionalLogProbGivenNext(int[] given,
int of)
Computes the probability of the tag OF being at the beginning of the table
given that the tag sequence GIVEN is at the end of the table.
|
double |
conditionalLogProbGivenPrevious(int[] given,
int of)
Computes the probability of the tag OF being at the end of the table given
that the previous tag sequence in table is GIVEN.
|
double[] |
conditionalLogProbsGivenPrevious(int[] given)
Computes the probabilities of the tag at the end of the table given that
the previous tag sequence in table is GIVEN.
|
void |
divideBy(FactorTable other) |
double |
getValue(int index) |
double |
getValue(int[] label) |
boolean |
hasNaN() |
void |
incrementValue(int[] label,
double value) |
void |
incrementValue(int index,
double value) |
void |
logIncrementValue(int[] label,
double value) |
double |
logProb(int[] label) |
double |
logProbEnd(int label) |
double |
logProbEnd(int[] labels) |
double |
logProbFront(int label) |
double |
logProbFront(int[] label) |
static void |
main(java.lang.String[] args) |
void |
multiplyInEnd(FactorTable other) |
void |
multiplyInFront(FactorTable other) |
int |
numClasses() |
double |
prob(int[] label) |
void |
setValue(int[] label,
double value) |
void |
setValue(int index,
double value) |
int |
size() |
FactorTable |
sumOutEnd() |
FactorTable |
sumOutFront() |
int[] |
toArray(int index) |
java.lang.String |
toNonLogString() |
java.lang.String |
toProbString() |
java.lang.String |
toString() |
<L> java.lang.String |
toString(Index<L> classIndex) |
double |
totalMass() |
double |
unnormalizedConditionalLogProbGivenFirst(int given,
int[] of)
Computes the probability of the sequence OF being at the end of the table
given that the first tag in table is GIVEN.
|
double |
unnormalizedLogProb(int[] label)
Returns a single clique potential.
|
double |
unnormalizedLogProb(int front,
int[] end,
int cutoff)
Returns a single clique potential.
|
double |
unnormalizedLogProbEnd(int label) |
double |
unnormalizedLogProbEnd(int[] labels) |
double |
unnormalizedLogProbFront(int label) |
double |
unnormalizedLogProbFront(int[] labels) |
int |
windowSize() |
public FactorTable(int numClasses, int windowSize)
public FactorTable(FactorTable t)
public boolean hasNaN()
public java.lang.String toProbString()
public java.lang.String toNonLogString()
public <L> java.lang.String toString(Index<L> classIndex)
public java.lang.String toString()
toString
in class java.lang.Object
public int[] toArray(int index)
public int windowSize()
public int numClasses()
public int size()
public double totalMass()
public double unnormalizedLogProb(int[] label)
public double unnormalizedLogProb(int front, int[] end, int cutoff)
public double logProb(int[] label)
public double prob(int[] label)
public double conditionalLogProbGivenPrevious(int[] given, int of)
public double[] conditionalLogProbsGivenPrevious(int[] given)
public double conditionalLogProbGivenFirst(int given, int[] of)
public double unnormalizedConditionalLogProbGivenFirst(int given, int[] of)
public double conditionalLogProbGivenNext(int[] given, int of)
public double unnormalizedLogProbFront(int[] labels)
public double logProbFront(int[] label)
public double unnormalizedLogProbFront(int label)
public double logProbFront(int label)
public double unnormalizedLogProbEnd(int[] labels)
public double logProbEnd(int[] labels)
public double unnormalizedLogProbEnd(int label)
public double logProbEnd(int label)
public double getValue(int index)
public double getValue(int[] label)
public void setValue(int index, double value)
public void setValue(int[] label, double value)
public void incrementValue(int[] label, double value)
public void incrementValue(int index, double value)
public void logIncrementValue(int[] label, double value)
public void multiplyInFront(FactorTable other)
public void multiplyInEnd(FactorTable other)
public FactorTable sumOutEnd()
public FactorTable sumOutFront()
public void divideBy(FactorTable other)
public static void main(java.lang.String[] args)