public class SUMOKBtoTPTPKB
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
SUMOKBtoTPTPKB.OrderedFormulae |
Modifier and Type | Field and Description |
---|---|
static boolean |
filterSimpleOnly |
KB |
kb |
Constructor and Description |
---|
SUMOKBtoTPTPKB() |
Modifier and Type | Method and Description |
---|---|
static void |
addToFile(java.lang.String fileName,
java.util.ArrayList<java.lang.String> axioms,
java.lang.String conjecture) |
static java.util.HashSet<java.lang.String> |
buildExcludedPredicates()
define a set of predicates which will not be used for inference
|
java.lang.String |
copyFile(java.lang.String fileName) |
static boolean |
filterExcludePredicates(java.util.HashSet<java.lang.String> excludedPredicates,
Formula formula)
return true if the given formula is simple clause,
and contains one of the excluded predicates;
otherwise return true;
|
static void |
main(java.lang.String[] args) |
protected void |
printVariableArityRelationContent(java.io.PrintWriter pr,
java.util.TreeMap<java.lang.String,java.lang.String> relationMap,
java.lang.String sanitizedKBName,
int axiomIndex,
boolean onlyPlainFOL) |
int |
tptpParse()
This method translates the entire KB to TPTP format, storing
the translation for each Formula in the List identified by the
private member Formula.theTptpFormulas.
|
java.lang.String |
writeTPTPFile(java.lang.String fileName,
boolean onlyPlainFOL)
Sets reasoner and calls writeTPTPFile() below
|
java.lang.String |
writeTPTPFile(java.lang.String fileName,
boolean onlyPlainFOL,
java.lang.String reasoner)
Sets conjecture and calls writeTPTPFile() below
|
java.lang.String |
writeTPTPFile(java.lang.String fileName,
Formula conjecture,
boolean onlyPlainFOL,
java.lang.String reasoner)
Sets isQuestion and calls writeTPTPFile() below
|
java.lang.String |
writeTPTPFile(java.lang.String fileName,
Formula conjecture,
boolean onlyPlainFOL,
java.lang.String reasoner,
boolean isQuestion)
Sets pw and calls writeTPTPFile() below
|
java.lang.String |
writeTPTPFile(java.lang.String fileName,
Formula conjecture,
boolean onlyPlainFOL,
java.lang.String reasoner,
boolean isQuestion,
java.io.PrintWriter pw)
Write all axioms in the KB to TPTP format.
|
public static final boolean filterSimpleOnly
public KB kb
public int tptpParse()
public java.lang.String copyFile(java.lang.String fileName)
public static void addToFile(java.lang.String fileName, java.util.ArrayList<java.lang.String> axioms, java.lang.String conjecture)
protected void printVariableArityRelationContent(java.io.PrintWriter pr, java.util.TreeMap<java.lang.String,java.lang.String> relationMap, java.lang.String sanitizedKBName, int axiomIndex, boolean onlyPlainFOL)
relationMap
- is a Map of String keys and values where
the key is the renamed relation and the
value is the original name.public java.lang.String writeTPTPFile(java.lang.String fileName, boolean onlyPlainFOL)
public java.lang.String writeTPTPFile(java.lang.String fileName, boolean onlyPlainFOL, java.lang.String reasoner)
public java.lang.String writeTPTPFile(java.lang.String fileName, Formula conjecture, boolean onlyPlainFOL, java.lang.String reasoner)
public java.lang.String writeTPTPFile(java.lang.String fileName, Formula conjecture, boolean onlyPlainFOL, java.lang.String reasoner, boolean isQuestion)
public java.lang.String writeTPTPFile(java.lang.String fileName, Formula conjecture, boolean onlyPlainFOL, java.lang.String reasoner, boolean isQuestion, java.io.PrintWriter pw)
fileName
- - the full pathname of the file to writepublic static java.util.HashSet<java.lang.String> buildExcludedPredicates()
public static boolean filterExcludePredicates(java.util.HashSet<java.lang.String> excludedPredicates, Formula formula)
public static void main(java.lang.String[] args)