LaTeX to CAS translator

Jump to navigation Jump to search

This mockup demonstrates the concept of TeX to Computer Algebra System (CAS) conversion.

The demo-application converts LaTeX functions which directly translate to CAS counterparts.

Functions without explicit CAS support are available for translation via a DRMF package (under development).

The following LaTeX input ...

{\displaystyle \Omega = 0}

... is translated to the CAS output ...

Semantic latex: \Omega = 0

Confidence: 0

Mathematica

Translation: \[CapitalOmega] == 0

Information

Sub Equations

  • \[CapitalOmega] = 0

Free variables

  • \[CapitalOmega]

Symbol info

  • Could be The omega constant == the Adamchik constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

Tests

Symbolic

Test expression: (\[CapitalOmega])-(0)

ERROR:

{
    "result": "ERROR",
    "testTitle": "Simple",
    "testExpression": null,
    "resultExpression": null,
    "wasAborted": false,
    "conditionallySuccessful": false
}
Numeric

SymPy

Translation: Symbol('Omega') == 0

Information

Sub Equations

  • Symbol('Omega') = 0

Free variables

  • Symbol('Omega')

Symbol info

  • Could be The omega constant == the Adamchik constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

Tests

Symbolic
Numeric

Maple

Translation: Omega = 0

Information

Sub Equations

  • Omega = 0

Free variables

  • Omega

Symbol info

  • Could be The omega constant == the Adamchik constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Description

  • equation
  • Lamé equation
  • Mathieu equation

Complete translation information:

{
  "id" : "FORMULA_f25352d90699ecd9964372e37b7ce41e",
  "formula" : "\\Omega = 0",
  "semanticFormula" : "\\Omega = 0",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "\\[CapitalOmega] == 0",
      "translationInformation" : {
        "subEquations" : [ "\\[CapitalOmega] = 0" ],
        "freeVariables" : [ "\\[CapitalOmega]" ],
        "tokenTranslations" : {
          "\\Omega" : "Could be The omega constant == the Adamchik constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n"
        }
      },
      "numericResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "wasAborted" : false,
        "crashed" : false,
        "testCalculationsGroups" : [ ]
      },
      "symbolicResults" : {
        "overallResult" : "ERROR",
        "numberOfTests" : 1,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 1,
        "crashed" : false,
        "testCalculationsGroup" : [ {
          "lhs" : "\\[CapitalOmega]",
          "rhs" : "0",
          "testExpression" : "(\\[CapitalOmega])-(0)",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "Symbol('Omega') == 0",
      "translationInformation" : {
        "subEquations" : [ "Symbol('Omega') = 0" ],
        "freeVariables" : [ "Symbol('Omega')" ],
        "tokenTranslations" : {
          "\\Omega" : "Could be The omega constant == the Adamchik constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n"
        }
      }
    },
    "Maple" : {
      "translation" : "Omega = 0",
      "translationInformation" : {
        "subEquations" : [ "Omega = 0" ],
        "freeVariables" : [ "Omega" ],
        "tokenTranslations" : {
          "\\Omega" : "Could be The omega constant == the Adamchik constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n"
        }
      }
    }
  },
  "positions" : [ {
    "section" : 1,
    "sentence" : 5,
    "word" : 1
  } ],
  "includes" : [ "\\Omega" ],
  "isPartOf" : [ "\\Omega = 0, k = 0, \\kappa = 2h, \\Lambda -2h^2 = \\lambda, x= z \\pm \\frac{\\pi}{2}" ],
  "definiens" : [ {
    "definition" : "equation",
    "score" : 0.8728715749853855
  }, {
    "definition" : "Lamé equation",
    "score" : 0.6687181434333315
  }, {
    "definition" : "Mathieu equation",
    "score" : 0.6432331635625809
  } ]
}

Specify your own input