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 |\mathrm{Arg}(a)|<\pi, s \in \mathbb{C}}

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

Semantic latex: |\mathrm{Arg}(a)|< \cpi , s \in \mathbb{C}

Confidence: 0

Mathematica

Translation: Abs[Arg[a]] < Pi s \[Element]C

Information

Free variables

  • C
  • a
  • s

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Pi was translated to: Pi

Tests

Symbolic

Test expression: Abs[A*r*g*(a)]

ERROR:

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

Test expression: Pi s

ERROR:

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

SymPy

Translation: abs(Arg(a)) < pi s null C

Information

Free variables

  • C
  • a
  • s

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Pi was translated to: pi

Tests

Symbolic
Numeric

Maple

Translation: abs(Arg(a)) < Pi; s in C

Information

Free variables

  • C
  • a
  • s

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Pi was translated to: Pi

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • asymptotic expansion
  • Pochhammer symbol

Complete translation information:

{
  "id" : "FORMULA_d47055856e3c72f09de27a0cb7e3a723",
  "formula" : "|\\mathrm{Arg}(a)|<\\pi, s \\in \\mathbb{C}",
  "semanticFormula" : "|\\mathrm{Arg}(a)|< \\cpi , s \\in \\mathbb{C}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Abs[Arg[a]] < Pi\n s \\[Element]C",
      "translationInformation" : {
        "freeVariables" : [ "C", "a", "s" ],
        "tokenTranslations" : {
          "Arg" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\cpi" : "Pi was translated to: Pi"
        }
      },
      "numericResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "wasAborted" : false,
        "crashed" : false,
        "testCalculationsGroups" : [ ]
      },
      "symbolicResults" : {
        "overallResult" : "ERROR",
        "numberOfTests" : 2,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 2,
        "crashed" : false,
        "testCalculationsGroup" : [ {
          "lhs" : "Abs[A*r*g*(a)]",
          "rhs" : "",
          "testExpression" : "Abs[A*r*g*(a)]",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        }, {
          "lhs" : "Pi\n s",
          "rhs" : "",
          "testExpression" : "Pi\n s",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "abs(Arg(a)) < pi\n s null C",
      "translationInformation" : {
        "freeVariables" : [ "C", "a", "s" ],
        "tokenTranslations" : {
          "Arg" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\cpi" : "Pi was translated to: pi"
        }
      }
    },
    "Maple" : {
      "translation" : "abs(Arg(a)) < Pi; s in C",
      "translationInformation" : {
        "freeVariables" : [ "C", "a", "s" ],
        "tokenTranslations" : {
          "Arg" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\cpi" : "Pi was translated to: Pi"
        }
      }
    }
  },
  "positions" : [ {
    "section" : 6,
    "sentence" : 1,
    "word" : 3
  } ],
  "includes" : [ "s", "a" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "asymptotic expansion",
    "score" : 0.6859086196238077
  }, {
    "definition" : "Pochhammer symbol",
    "score" : 0.5988174995334326
  } ]
}

Specify your own input