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 u=ik/2+y}

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

Semantic latex: u = \iunit k / 2 + y

Confidence: 0

Mathematica

Translation: u == I*k/2 + y

Information

Sub Equations

  • u = I*k/2 + y

Free variables

  • k
  • u
  • y

Symbol info

  • Imaginary unit was translated to: I

Tests

Symbolic

Test expression: (u)-(I*k/2 + y)

ERROR:

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

SymPy

Translation: u == I*k/2 + y

Information

Sub Equations

  • u = I*k/2 + y

Free variables

  • k
  • u
  • y

Symbol info

  • Imaginary unit was translated to: I

Tests

Symbolic
Numeric

Maple

Translation: u = I*k/2 + y

Information

Sub Equations

  • u = I*k/2 + y

Free variables

  • k
  • u
  • y

Symbol info

  • Imaginary unit was translated to: I

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • variable
  • contour
  • integral
  • rectangle in the complex plane
  • respect

Complete translation information:

{
  "id" : "FORMULA_2048237595912b6777940fb5870d4876",
  "formula" : "u=ik/2+y",
  "semanticFormula" : "u = \\iunit k / 2 + y",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "u == I*k/2 + y",
      "translationInformation" : {
        "subEquations" : [ "u = I*k/2 + y" ],
        "freeVariables" : [ "k", "u", "y" ],
        "tokenTranslations" : {
          "\\iunit" : "Imaginary unit was translated to: I"
        }
      },
      "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" : "u",
          "rhs" : "I*k/2 + y",
          "testExpression" : "(u)-(I*k/2 + y)",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "u == I*k/2 + y",
      "translationInformation" : {
        "subEquations" : [ "u = I*k/2 + y" ],
        "freeVariables" : [ "k", "u", "y" ],
        "tokenTranslations" : {
          "\\iunit" : "Imaginary unit was translated to: I"
        }
      }
    },
    "Maple" : {
      "translation" : "u = I*k/2 + y",
      "translationInformation" : {
        "subEquations" : [ "u = I*k/2 + y" ],
        "freeVariables" : [ "k", "u", "y" ],
        "tokenTranslations" : {
          "\\iunit" : "Imaginary unit was translated to: I"
        }
      }
    }
  },
  "positions" : [ {
    "section" : 2,
    "sentence" : 3,
    "word" : 17
  } ],
  "includes" : [ "y" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "variable",
    "score" : 0.6859086196238077
  }, {
    "definition" : "contour",
    "score" : 0.6460746792928004
  }, {
    "definition" : "integral",
    "score" : 0.5988174995334326
  }, {
    "definition" : "rectangle in the complex plane",
    "score" : 0.5988174995334326
  }, {
    "definition" : "respect",
    "score" : 0.5988174995334326
  } ]
}

Specify your own input