Package com.articulate.sigma.trans
Class SUMOKBtoTPTPKB
java.lang.Object
com.articulate.sigma.trans.SUMOKBtoTPTPKB
- Direct Known Subclasses:
SUMOKBtoTFAKB
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanstatic booleanstatic final booleanstatic Stringstatic booleanFlag to enable rapid parsing via multiple threads coordinated by an ExecutorServicestatic booleanstatic booleanstatic boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddefine a set of predicates which will not be used for inferencestatic StringbooleanfilterAxiom(Formula form, String tptp, PrintWriter pw) Deprecated.booleanfilterAxiom(Formula form, String tptp, List<String> fileContents) booleanfilterExcludePredicates(Formula formula) static Stringstatic voidWill first write out SUMO.tptp if the KB had not yet been serialized, or serialized files are older than the sources, then, will write out a fresh SUMO.fof.voidPrint the sorts of any numeric constants encountered during processing.voidprintTFFNumericConstants(List<String> fileContents) Print the sorts of any numeric constants encountered during processing.protected voidprintVariableArityRelationContent(PrintWriter pr, Map<String, String> relationMap, String sanitizedKBName, AtomicInteger axiomIndex) writeFile(String fileName, Formula conjecture, boolean isQuestion, PrintWriter pw) Write all axioms in the KB to TPTP format.voidwriteHeader(PrintWriter pw, String sanitizedKBName)
-
Field Details
-
FILTER_SIMPLE_ONLY
public static final boolean FILTER_SIMPLE_ONLY- See Also:
-
kb
-
removeHOL
public static boolean removeHOL -
removeNum
public static boolean removeNum -
removeStrings
public static boolean removeStrings -
rapidParsing
public static boolean rapidParsingFlag to enable rapid parsing via multiple threads coordinated by an ExecutorService -
debug
public static boolean debug -
lang
-
CWA
public static boolean CWA -
excludedPredicates
-
axiomKey
-
alreadyWrittenTPTPs
-
-
Constructor Details
-
SUMOKBtoTPTPKB
public SUMOKBtoTPTPKB()
-
-
Method Details
-
buildExcludedPredicates
define a set of predicates which will not be used for inference -
getSanitizedKBname
-
langToExtension
-
extensionToLang
-
getInfFilename
-
copyFile
-
addToFile
-
printVariableArityRelationContent
protected void printVariableArityRelationContent(PrintWriter pr, Map<String, String> relationMap, String sanitizedKBName, AtomicInteger axiomIndex) - Parameters:
relationMap- is a Map of String keys and values where the key is the renamed relation and the value is the original name.
-
printTFFNumericConstants
Print the sorts of any numeric constants encountered during processing. They are stored in SUMOtoTFAform.numericConstantTypes -
printTFFNumericConstants
Print the sorts of any numeric constants encountered during processing. They are stored in SUMOtoTFAform.numericConstantTypes -
writeHeader
-
writeFile
Write all axioms in the KB to TPTP format.- Parameters:
fileName- - the full pathname of the file to writeconjecture- a conjecture to query the KB with if anyisQuestion- flag to denote a question being posedpw- the PrintWriter to write TPTP with- Returns:
- the name of the KB translation to TPTP file
-
filterExcludePredicates
- Returns:
- true if the given formula is simple clause, and contains one of the excluded predicates; otherwise return false;
-
filterAxiom
Deprecated. -
filterAxiom
-
main
Will first write out SUMO.tptp if the KB had not yet been serialized, or serialized files are older than the sources, then, will write out a fresh SUMO.fof.- Parameters:
args- any given command line arguments (not currently used)
-