|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tuffy.mln.Predicate felix.dstruct.FelixPredicate
public class FelixPredicate
The predicate object used in Felix, which extends the Predicate class in Tuffy to contain Felix-related fields and methods.
Nested Class Summary | |
---|---|
static class |
FelixPredicate.FPProperty
Properties that can be assigned to each predicate. |
Field Summary | |
---|---|
ConcurrentOperatorsBucket |
belongsTo
The parent ConcurrentOperatorsBucket . |
FelixPredicate |
corefMAPPredicate
If isCorefPredicate is true, which
relation serves as the linear-view-representation of it? |
java.lang.String |
dependencyFile
Path the HDFS file that this predicate depends on. |
java.lang.String |
dependencyName
Type of dependencies, e.g., "hdfs", "jdbc" etc. |
boolean |
isCorefMapPredicate
Whether this predicate is the view-based representation of a coref operator. |
boolean |
isCorefPredicate
Whether this predicate is a coref operator. |
java.lang.String |
jdbcdep
Whether the extraction of this relation relies on other relations. |
boolean |
loadFromDatabase
Whether the evidence file of this relation exists in some relational table instead of input evid. |
java.lang.String |
loadingSchema
see loadFromDatabase |
java.lang.String |
loadingTable
see loadFromDatabase |
java.lang.String |
mapinitScript
Python script for running before all MAPs. |
java.lang.String |
mapinputvar
The name of MAP's input variable. |
java.lang.String |
mapScript
Python script for MAP. |
StatOperator.OPType |
mustbe
The type of operator this predicate must be assigned to. |
boolean |
needExtractFeatures
Do we need to extract features from HDFS for this relation? |
FelixPredicate |
oriCorefPredicate
If isCorefMapPredicate is true, to which this
predicate serves. |
java.lang.String |
reduceinitScript
Python script for running before all REDUCEs. |
java.lang.String |
reduceinputkeyvar
The name of REDUCE's input key variable. |
java.lang.String |
reduceinputvaluesvar
The name of REDUCE's input value variable. |
java.lang.String |
reduceScript
Python script for MAP. |
java.lang.String |
viewDef
If this relation is defined as a view instead of a table, what is its view definition? |
java.lang.String |
xmltag
If the input is XML tag, which <xmltag></xmltag> should we send to MAP as a unit? |
Fields inherited from class tuffy.mln.Predicate |
---|
hasEvid, isCurrentlyView |
Constructor Summary | |
---|---|
FelixPredicate(java.lang.String aname,
boolean aClosedWorld)
The constructor. |
Method Summary | |
---|---|
void |
addEvidence(tuffy.mln.Atom a)
Adds atom as evidence to this predicate (Override Felix version) - the difference is that we sometimes flush it to file directly. |
void |
flushStrEvidence(java.lang.String rName)
Flushes string-based evidence to database. |
java.util.ArrayList<java.lang.String> |
getCRFPartitionFields()
Get partitioning fields of sequence if this predicate is CRF. |
java.util.ArrayList<java.lang.String> |
getKeyFieldsArgs()
Get the key position if this predicate is LR or CRF. |
java.util.HashSet<java.lang.Integer> |
getKeyPositions()
Get FelixPredicate#keyPositions . |
java.util.ArrayList<java.lang.String> |
getLabelFieldsArgs()
Get the label fields' name if this predicate is LR or CRF. |
java.util.ArrayList<java.lang.String> |
getLabelFieldsTypeTable()
Get the label types if this predicate is LR or CRF. |
java.util.ArrayList<java.lang.Integer> |
getLabelPositions()
Get the label position if this predicate is LR or CRF. |
static java.lang.String |
getNextTmpPredicateName()
Get the name of the next temporary predicate. |
FelixPredicate |
getOriCorefPredicate()
If isCorefMapPredicate is true, to which this
predicate serves. |
java.util.HashSet<FelixClause> |
getPropertyClauses(FelixPredicate.FPProperty prop)
Get clauses associated to the given property. |
java.util.HashSet<FelixClause> |
getRelevantClauses()
Get all clauses related to this predicate. |
boolean |
hasProperty(FelixPredicate.FPProperty prop)
Whether this predicate has the given property. |
boolean |
isCorefMap()
Whether this predicate is the view-based representation of a coref operator. |
void |
registerProperty(FelixPredicate.FPProperty prop,
FelixClause evid,
int... _pos)
Add a property to this predicate, along with the clause with this property. |
void |
setEmbeddedPythonCode(java.lang.String content)
Sets embedded python code for this predicate |
java.lang.String |
toString()
Returns string representation of this predicate. |
void |
tryToExtractSeqFromChainRule(FelixClause fc)
If the given clause is a CRF chain rule, try to extract the partitions of sequence. |
Methods inherited from class tuffy.mln.Predicate |
---|
addDependentAttrPosition, addFunctionalDependency, addQuery, addRelatedClause, appendArgument, appendArgument, appendToWriter, arity, closeFiles, createTable, flushEvidence, getArgPositionByName, getArgs, getBuiltInPredByName, getDependentAttrPositions, getDependentAttrs, getID, getKeyAttrPositions, getKeyAttrs, getLabelAttrPositions, getName, getQueryAtoms, getRelAct, getRelatedClauses, getRelName, getTypeAt, groundAndStoreAtom, hasDependentAttributes, hasMoreToGround, hasQuery, hasSoftEvidence, isBuiltIn, isBuiltInPredName, isClosedWorld, isCompletelySepcified, isImmutable, isSafeRefOnly, noNeedToGround, prepareDB, sealDefinition, setAllQuery, setClosedWorld, setCompeletelySpecified, setDB, setHasSoftEvidence, setID, setMLN, setSafeRefOnly, storeQueries |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public java.lang.String dependencyFile
public java.lang.String dependencyName
public java.lang.String mapScript
public java.lang.String mapinitScript
public java.lang.String reduceinitScript
public java.lang.String reduceScript
public boolean needExtractFeatures
public java.lang.String xmltag
public java.lang.String jdbcdep
public java.lang.String mapinputvar
public java.lang.String reduceinputkeyvar
public java.lang.String reduceinputvaluesvar
public boolean loadFromDatabase
public java.lang.String loadingSchema
loadFromDatabase
public java.lang.String loadingTable
loadFromDatabase
public StatOperator.OPType mustbe
public ConcurrentOperatorsBucket belongsTo
ConcurrentOperatorsBucket
.
public boolean isCorefMapPredicate
public boolean isCorefPredicate
public FelixPredicate oriCorefPredicate
isCorefMapPredicate
is true, to which this
predicate serves.
public FelixPredicate corefMAPPredicate
isCorefPredicate
is true, which
relation serves as the linear-view-representation of it?
public java.lang.String viewDef
Constructor Detail |
---|
public FelixPredicate(java.lang.String aname, boolean aClosedWorld)
aname
- aClosedWorld
- Method Detail |
---|
public void addEvidence(tuffy.mln.Atom a)
addEvidence
in class tuffy.mln.Predicate
a
- public java.util.ArrayList<java.lang.Integer> getLabelPositions()
public void setEmbeddedPythonCode(java.lang.String content)
content
- public java.util.ArrayList<java.lang.String> getCRFPartitionFields()
public java.util.ArrayList<java.lang.String> getKeyFieldsArgs()
public java.util.ArrayList<java.lang.String> getLabelFieldsTypeTable()
public java.util.ArrayList<java.lang.String> getLabelFieldsArgs()
public static java.lang.String getNextTmpPredicateName()
public boolean isCorefMap()
public FelixPredicate getOriCorefPredicate()
isCorefMapPredicate
is true, to which this
predicate serves.
public java.util.HashSet<FelixClause> getPropertyClauses(FelixPredicate.FPProperty prop)
prop
-
public boolean hasProperty(FelixPredicate.FPProperty prop)
prop
-
public java.util.HashSet<java.lang.Integer> getKeyPositions()
FelixPredicate#keyPositions
.
public void flushStrEvidence(java.lang.String rName)
rName
- public java.util.HashSet<FelixClause> getRelevantClauses()
public void registerProperty(FelixPredicate.FPProperty prop, FelixClause evid, int... _pos)
prop
- evid
- _pos
- if this property is key constraint, this parameter is the position
of keys.public void tryToExtractSeqFromChainRule(FelixClause fc)
fc
- public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |