public class NaiveMlnReasoner extends AbstractMlnReasoner
Modifier and Type | Field and Description |
---|---|
private java.io.File |
archivedFile
If the model has already been computed this file contains it.
|
private java.lang.String |
tempDirectory
Directory for temporary files.
|
Constructor and Description |
---|
NaiveMlnReasoner(BeliefBase beliefBase)
Creates a new NaiveMlnReasoner for the given Markov logic network.
|
NaiveMlnReasoner(BeliefBase beliefBase,
FolSignature signature)
Creates a new NaiveMlnReasoner for the given Markov logic network.
|
Modifier and Type | Method and Description |
---|---|
private java.io.File |
computeModel()
Computes the model of the given MLN.
|
double |
doQuery(FolFormula query)
Performs the actual querying.
|
private HerbrandInterpretation |
parseInterpretation(java.lang.String str)
Constructs a Herbrand interpretation from the given string
|
void |
reset()
Resets this reasoner (removes cached files etc.)
|
void |
setTempDirectory(java.lang.String str)
Sets the path of the directory for temporary files.
|
computeWeight, getSignature, numberOfGroundSatisfactions, query
getKnowledgeBase
private java.lang.String tempDirectory
private java.io.File archivedFile
public NaiveMlnReasoner(BeliefBase beliefBase)
beliefBase
- a Markov logic network.public NaiveMlnReasoner(BeliefBase beliefBase, FolSignature signature)
beliefBase
- a Markov logic network.signature
- another signature (if the probability distribution should be defined
on that one (that one should subsume the signature of the Markov logic network)public void reset()
AbstractMlnReasoner
reset
in class AbstractMlnReasoner
public void setTempDirectory(java.lang.String str)
str
- a file pathprivate java.io.File computeModel()
public double doQuery(FolFormula query)
AbstractMlnReasoner
doQuery
in class AbstractMlnReasoner
query
- a fol formula guaranteed to be ground.private HerbrandInterpretation parseInterpretation(java.lang.String str)
str
- a string.