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 \theta = 0}

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

Semantic latex: \theta = 0

Confidence: 0

Mathematica

Translation: \[Theta] == 0

Information

Sub Equations

  • \[Theta] = 0

Free variables

  • \[Theta]

Tests

Symbolic

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

ERROR:

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

SymPy

Translation: Symbol('theta') == 0

Information

Sub Equations

  • Symbol('theta') = 0

Free variables

  • Symbol('theta')

Tests

Symbolic
Numeric

Maple

Translation: theta = 0

Information

Sub Equations

  • theta = 0

Free variables

  • theta

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • angular coordinate
  • point towards the center
  • reference direction
  • center
  • direction
  • ellipse 's equation
  • focus
  • major axis
  • polar coordinate with the origin
  • sign in the denominator

Complete translation information:

{
  "id" : "FORMULA_7bc661a80c761d3325a18363117f4657",
  "formula" : "\\theta = 0",
  "semanticFormula" : "\\theta = 0",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "\\[Theta] == 0",
      "translationInformation" : {
        "subEquations" : [ "\\[Theta] = 0" ],
        "freeVariables" : [ "\\[Theta]" ]
      },
      "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" : "\\[Theta]",
          "rhs" : "0",
          "testExpression" : "(\\[Theta])-(0)",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "Symbol('theta') == 0",
      "translationInformation" : {
        "subEquations" : [ "Symbol('theta') = 0" ],
        "freeVariables" : [ "Symbol('theta')" ]
      }
    },
    "Maple" : {
      "translation" : "theta = 0",
      "translationInformation" : {
        "subEquations" : [ "theta = 0" ],
        "freeVariables" : [ "theta" ]
      }
    }
  },
  "positions" : [ {
    "section" : 15,
    "sentence" : 0,
    "word" : 17
  }, {
    "section" : 15,
    "sentence" : 0,
    "word" : 43
  } ],
  "includes" : [ "= 0", "\\theta" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "angular coordinate",
    "score" : 0.722
  }, {
    "definition" : "point towards the center",
    "score" : 0.722
  }, {
    "definition" : "reference direction",
    "score" : 0.722
  }, {
    "definition" : "center",
    "score" : 0.7125985104912714
  }, {
    "definition" : "direction",
    "score" : 0.6859086196238077
  }, {
    "definition" : "ellipse 's equation",
    "score" : 0.6859086196238077
  }, {
    "definition" : "focus",
    "score" : 0.6859086196238077
  }, {
    "definition" : "major axis",
    "score" : 0.6859086196238077
  }, {
    "definition" : "polar coordinate with the origin",
    "score" : 0.6859086196238077
  }, {
    "definition" : "sign in the denominator",
    "score" : 0.6859086196238077
  } ]
}

Specify your own input