|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
dstruct.StatOperator
operator.CRFOperator
public class CRFOperator
A CRF operator in Felix.
Nested Class Summary | |
---|---|
(package private) class |
CRFOperator.Node
Class for a node in the CRFOperator.Sequence . |
(package private) class |
CRFOperator.Sequence
In-memory representation of a CRF chain. |
Nested classes/interfaces inherited from class dstruct.StatOperator |
---|
StatOperator.OPType |
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
(package private) DataMovementOperator |
bigramDMO
The DataMovementOperator representing the table/view for all bigram features. |
(package private) DataMovementOperator |
crfDMO
The DataMovementOperator used as CRF Chain rule. |
(package private) FelixPredicate |
crfHead
Target predicate of this CRF operator. |
(package private) DataMovementOperator |
getAllBigramFeaturesDMO
The DataMovementOperator fetching all bigram features. |
(package private) DataMovementOperator |
getAllPossiblePartitioningDMO
The DataMovementOperator fetching a partition of grounded literals (which may be a sequence or multiples sequences) |
(package private) DataMovementOperator |
getAllUnigramFeaturesDMO
The DataMovementOperator fetching all unigram features. |
(package private) DataMovementOperator |
getBigramFeaturesForPartitioningDMO
The DataMovementOperator fetching all bigram features for a given sequence. |
(package private) DataMovementOperator |
getUnigramFeaturesForPartitioningDMO
The DataMovementOperator fetching all unigram features for a given sequence |
(package private) java.util.HashMap<java.lang.Integer,java.lang.String[]> |
id2Label
The inverse map of label2ID . |
(package private) java.util.HashMap<java.lang.String,java.lang.Integer> |
label2ID
Mapping from label's constant ID to a new label ID. |
(package private) DataMovementOperator |
labelDomainDMO
The DataMovementOperator representing the table/view for all possible labels. |
(package private) DataMovementOperator |
lrDMO
The DataMovementOperator which is the union of all LR rules. |
(package private) java.util.ArrayList<DataMovementOperator> |
lrDMOs
All DataMovementOperators used as LR rules. |
(package private) DataMovementOperator |
unigramDMO
The DataMovementOperator representing the table/view for all unigram features. |
Fields inherited from class dstruct.StatOperator |
---|
allDMOs, allRelevantFelixClause, belongsToBucket, clauseConstraints, dataCrackerSignature, db, fq, inputPredicates, isMarginal, options, outputPredicates, partitionedInto, precedence, type |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
CRFOperator(FelixQuery _fq,
java.util.HashSet<FelixPredicate> _goalPredicates,
parser.CommandOptions _opt)
The constructor of CRFOperator. |
Method Summary | |
---|---|
(package private) java.lang.String |
array2str(java.lang.String[] _array)
Return the signature of a string array as a string. |
java.lang.String |
explain()
Human-readable representation of the logic plan. |
void |
fastInfer(java.io.BufferedWriter bw)
Conduct CRF infer WITH knowledge about partitioning which is parsed statically from the input program. |
int |
getPartitionSize()
Estimate the number of sequences. |
static double |
logAdd(double logX,
double logY)
|
void |
prepare()
Generate the operator-specified logic plan, i.e., all data movement operators that will be used for inference. |
void |
prepareDMO(java.util.HashSet<mln.ConjunctiveQuery> lrQueries,
java.util.HashSet<mln.ConjunctiveQuery> chainQueries)
Generate Data Movement Operator used by this CRF Operator. |
void |
run()
Method that executes this operator. |
void |
slowInfer(java.io.BufferedWriter bw)
Conduct CRF infer WITHOUT knowledge about partitioning which is parsed statically from the input program. |
Methods inherited from class dstruct.StatOperator |
---|
clone, getAllDMOs, getPrecedence, getTargetPredicateIfHasOnlyOne, toString, translateFelixClasesIntoFactorGraphEdgeQueries |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
FelixPredicate crfHead
java.util.HashMap<java.lang.String,java.lang.Integer> label2ID
java.util.HashMap<java.lang.Integer,java.lang.String[]> id2Label
label2ID
. Here String[] means
there can be multiple fields corresponding to CRF's labeling field.
java.util.ArrayList<DataMovementOperator> lrDMOs
DataMovementOperator crfDMO
DataMovementOperator lrDMO
DataMovementOperator unigramDMO
DataMovementOperator bigramDMO
DataMovementOperator labelDomainDMO
DataMovementOperator getAllPossiblePartitioningDMO
DataMovementOperator getBigramFeaturesForPartitioningDMO
DataMovementOperator getUnigramFeaturesForPartitioningDMO
DataMovementOperator getAllBigramFeaturesDMO
DataMovementOperator getAllUnigramFeaturesDMO
Constructor Detail |
---|
public CRFOperator(FelixQuery _fq, java.util.HashSet<FelixPredicate> _goalPredicates, parser.CommandOptions _opt)
_fq
- Felix query._goalPredicates
- target predicates of this coref operator._opt
- Command line options of this Felix run.Method Detail |
---|
public void prepare()
StatOperator
prepare
in class StatOperator
java.lang.String array2str(java.lang.String[] _array)
_array
-
public void run()
StatOperator
run
in interface java.lang.Runnable
run
in class StatOperator
public java.lang.String explain()
StatOperator
explain
in class StatOperator
public void fastInfer(java.io.BufferedWriter bw)
bw
- Buffered writer to dump results.public void slowInfer(java.io.BufferedWriter bw)
bw
- Buffered writer to dump results.public void prepareDMO(java.util.HashSet<mln.ConjunctiveQuery> lrQueries, java.util.HashSet<mln.ConjunctiveQuery> chainQueries)
rules
- rules defining this operator.public int getPartitionSize()
public static double logAdd(double logX, double logY)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |