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 N=1}

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

Semantic latex: N=1

Confidence: 0

Mathematica

Translation: N == 1

Information

Sub Equations

  • N = 1

Free variables

  • N

Tests

Symbolic

Test expression: (N)-(1)

ERROR:

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

SymPy

Translation: N == 1

Information

Sub Equations

  • N = 1

Free variables

  • N

Tests

Symbolic
Numeric

Maple

Translation: N = 1

Information

Sub Equations

  • N = 1

Free variables

  • N

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • TeX Source
  • Gold ID
  • n
  • Formula
  • link

Complete translation information:

{
  "id" : "FORMULA_a9a738ef9d4e46360dd9b87b39c691bf",
  "formula" : "N=1",
  "semanticFormula" : "N=1",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "N == 1",
      "translationInformation" : {
        "subEquations" : [ "N = 1" ],
        "freeVariables" : [ "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" : "N",
          "rhs" : "1",
          "testExpression" : "(N)-(1)",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "N == 1",
      "translationInformation" : {
        "subEquations" : [ "N = 1" ],
        "freeVariables" : [ "N" ]
      }
    },
    "Maple" : {
      "translation" : "N = 1",
      "translationInformation" : {
        "subEquations" : [ "N = 1" ],
        "freeVariables" : [ "N" ]
      }
    }
  },
  "positions" : [ {
    "section" : 1,
    "sentence" : 0,
    "word" : 8
  } ],
  "includes" : [ "=1", "= 1" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "TeX Source",
    "score" : 0.722
  }, {
    "definition" : "Gold ID",
    "score" : 0.7125985104912714
  }, {
    "definition" : "n",
    "score" : 0.7125985104912714
  }, {
    "definition" : "Formula",
    "score" : 0.6859086196238077
  }, {
    "definition" : "link",
    "score" : 0.6859086196238077
  } ]
}

Specify your own input