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 x = \frac{1}{2}}

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

Semantic latex: x = \frac{1}{2}

Confidence: 0

Mathematica

Translation: x == Divide[1,2]

Information

Sub Equations

  • x = Divide[1,2]

Free variables

  • x

Tests

Symbolic

Test expression: (x)-(Divide[1,2])

ERROR:

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

SymPy

Translation: x == (1)/(2)

Information

Sub Equations

  • x = (1)/(2)

Free variables

  • x

Tests

Symbolic
Numeric

Maple

Translation: x = (1)/(2)

Information

Sub Equations

  • x = (1)/(2)

Free variables

  • x

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • beta function
  • evaluation at particular point
  • example
  • last formula
  • power function
  • term of a convolution

Complete translation information:

{
  "id" : "FORMULA_3f2839c216fb5e4ba5d1ac376ada1748",
  "formula" : "x = \\frac{1}{2}",
  "semanticFormula" : "x = \\frac{1}{2}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "x == Divide[1,2]",
      "translationInformation" : {
        "subEquations" : [ "x = Divide[1,2]" ],
        "freeVariables" : [ "x" ]
      },
      "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" : "x",
          "rhs" : "Divide[1,2]",
          "testExpression" : "(x)-(Divide[1,2])",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "x == (1)/(2)",
      "translationInformation" : {
        "subEquations" : [ "x = (1)/(2)" ],
        "freeVariables" : [ "x" ]
      }
    },
    "Maple" : {
      "translation" : "x = (1)/(2)",
      "translationInformation" : {
        "subEquations" : [ "x = (1)/(2)" ],
        "freeVariables" : [ "x" ]
      }
    }
  },
  "positions" : [ {
    "section" : 5,
    "sentence" : 4,
    "word" : 38
  } ],
  "includes" : [ "x" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "beta function",
    "score" : 0.6859086196238077
  }, {
    "definition" : "evaluation at particular point",
    "score" : 0.6859086196238077
  }, {
    "definition" : "example",
    "score" : 0.6859086196238077
  }, {
    "definition" : "last formula",
    "score" : 0.6859086196238077
  }, {
    "definition" : "power function",
    "score" : 0.6859086196238077
  }, {
    "definition" : "term of a convolution",
    "score" : 0.6859086196238077
  } ]
}

Specify your own input