Package com.articulate.sigma.trans
Class SUMOformulaToTPTPformula
java.lang.Object
com.articulate.sigma.trans.SUMOformulaToTPTPformula
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanstatic booleanstatic Stringstatic StringBuilder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidA test method.static StringThis is the primary method of the class.static StringprocessEquals(Formula f, Formula car, List<String> args) static StringprocessLogOp(Formula f, Formula car, List<String> args) static Stringstatic voidshowHelp()static voidA test method.static voidA test method.static voidA test method.static voidA test method.Deprecated.voidDeprecated.static StringtptpParseSUOKIFString(String suoString, boolean query) Parse a single formula into TPTP format.static StringtptpParseSUOKIFString(String suoString, boolean query, String requestedLang) Parse a single formula into TPTP format.static StringtranslateWord(String st, int type, boolean hasArguments) Encapsulates translateWord_1, which translates the logical operators and inequalities in SUO-KIF to their TPTP equivalents.
-
Field Details
-
_f
-
debug
public static boolean debug -
hideNumbers
public static boolean hideNumbers -
lang
-
qlist
-
-
Constructor Details
-
SUMOformulaToTPTPformula
public SUMOformulaToTPTPformula() -
SUMOformulaToTPTPformula
-
-
Method Details
-
translateWord
Encapsulates translateWord_1, which translates the logical operators and inequalities in SUO-KIF to their TPTP equivalents.- Parameters:
st- is the StreamTokenizer_s that contains the current token- Returns:
- the String that is the translated token
-
processLogOp
-
processEquals
-
processRecurse
-
generateQList
-
tptpParseSUOKIFString
Parse a single formula into TPTP format. This version reads from the static SUMOKBtoTPTPKB.lang field. For thread-safe operation during background TPTP generation, use tptpParseSUOKIFString(String, boolean, String) instead.- Parameters:
suoString- the formula entry to parsequery- true if the suoString is a query
-
tptpParseSUOKIFString
Parse a single formula into TPTP format. This version takes the language as a parameter to avoid race conditions with background TPTP generation threads that modify the static SUMOKBtoTPTPKB.lang field.- Parameters:
suoString- the formula entry to parsequery- true if the suoString is a queryrequestedLang- the TPTP language format to use ("fof", "tff", or "thf")
-
process
This is the primary method of the class. It takes a SUO-KIF formula and returns a TPTP formula. -
tptpParse
@Deprecated public void tptpParse(Formula input, boolean query, KB kb, Set<Formula> preProcessedForms) throws ParseException, IOException Deprecated.Parse formulae into TPTP format Result is returned in _f.theTptpFormulas- Throws:
ParseExceptionIOException
-
tptpParse
@Deprecated public Set<String> tptpParse(Formula input, boolean query, KB kb) throws ParseException, IOException Deprecated.Parse formulae into TPTP format- Throws:
ParseExceptionIOException
-
testTptpParse
public static void testTptpParse()A test method. -
testTptpParse2
public static void testTptpParse2()A test method. -
testTptpParse3
public static void testTptpParse3()A test method. -
testTptpParse4
public static void testTptpParse4()A test method. -
showHelp
public static void showHelp() -
main
A test method.
-