Class SUMOformulaToTPTPformula

java.lang.Object
com.articulate.sigma.trans.SUMOformulaToTPTPformula

public class SUMOformulaToTPTPformula extends Object
  • Field Details

    • _f

      public Formula _f
    • debug

      public static boolean debug
    • hideNumbers

      public static boolean hideNumbers
    • lang

      public static String lang
    • qlist

      public static StringBuilder qlist
  • Constructor Details

    • SUMOformulaToTPTPformula

      public SUMOformulaToTPTPformula()
    • SUMOformulaToTPTPformula

      public SUMOformulaToTPTPformula(String l)
  • Method Details

    • translateWord

      public static String translateWord(String st, int type, boolean hasArguments)
      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

      public static String processLogOp(Formula f, Formula car, List<String> args)
    • processEquals

      public static String processEquals(Formula f, Formula car, List<String> args)
    • processRecurse

      public static String processRecurse(Formula f)
    • generateQList

      public static void generateQList(Formula f)
    • tptpParseSUOKIFString

      public static String tptpParseSUOKIFString(String suoString, boolean query)
      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 parse
      query - true if the suoString is a query
    • tptpParseSUOKIFString

      public static String tptpParseSUOKIFString(String suoString, boolean query, String requestedLang)
      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 parse
      query - true if the suoString is a query
      requestedLang - the TPTP language format to use ("fof", "tff", or "thf")
    • process

      public static String process(Formula f, boolean query)
      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:
      ParseException
      IOException
    • tptpParse

      @Deprecated public Set<String> tptpParse(Formula input, boolean query, KB kb) throws ParseException, IOException
      Deprecated.
      Parse formulae into TPTP format
      Throws:
      ParseException
      IOException
    • 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

      public static void main(String[] args)
      A test method.