|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.stanford.nlp.ie.crf.FactorTable
public class FactorTable
Stores a factor table as a one dimensional array of doubles. This class supports a restricted form of factor table where each variable has the same set of values, but supports cliques of arbitrary size.
| Constructor Summary | |
|---|---|
FactorTable(FactorTable t)
|
|
FactorTable(int numClasses,
int windowSize)
|
|
| Method Summary | ||
|---|---|---|
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()
|
|
|
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 |
unnormalizedLogProbEnd(int label)
|
|
double |
unnormalizedLogProbEnd(int[] labels)
|
|
double |
unnormalizedLogProbFront(int label)
|
|
double |
unnormalizedLogProbFront(int[] labels)
|
|
int |
windowSize()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FactorTable(int numClasses,
int windowSize)
public FactorTable(FactorTable t)
| Method Detail |
|---|
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.Objectpublic int[] toArray(int index)
public int windowSize()
public int numClasses()
public int size()
public double totalMass()
public double unnormalizedLogProb(int[] label)
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)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||