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 \mathcal{K}_1(x; n) = -2x + n}

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

Semantic latex: \mathcal{K}_1(x; n) = -2x + n

Confidence: 0

Mathematica

Translation: Subscript[K, 1][x ; n] == - 2*x + n

Information

Sub Equations

  • Subscript[K, 1][x ; n] = - 2*x + n

Free variables

  • n
  • x

Symbol info

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

Tests

Symbolic
Numeric

SymPy

Translation: Symbol('{K}_{1}')(x ; n) == - 2*x + n

Information

Sub Equations

  • Symbol('{K}_{1}')(x ; n) = - 2*x + n

Free variables

  • n
  • x

Symbol info

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

Tests

Symbolic
Numeric

Maple

Translation: K[1](x ; n) = - 2*x + n

Information

Sub Equations

  • K[1](x ; n) = - 2*x + n

Free variables

  • n
  • x

Symbol info

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

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • first few polynomial

Complete translation information:

{
  "id" : "FORMULA_2cc5e9ea5e8e3f9a69ea76886d6ef484",
  "formula" : "\\mathcal{K}_1(x; n) = -2x + n",
  "semanticFormula" : "\\mathcal{K}_1(x; n) = -2x + n",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Subscript[K, 1][x ; n] == - 2*x + n",
      "translationInformation" : {
        "subEquations" : [ "Subscript[K, 1][x ; n] = - 2*x + n" ],
        "freeVariables" : [ "n", "x" ],
        "tokenTranslations" : {
          "K" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      },
      "numericResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "wasAborted" : false,
        "crashed" : false,
        "testCalculationsGroups" : [ ]
      },
      "symbolicResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    },
    "SymPy" : {
      "translation" : "Symbol('{K}_{1}')(x ; n) == - 2*x + n",
      "translationInformation" : {
        "subEquations" : [ "Symbol('{K}_{1}')(x ; n) = - 2*x + n" ],
        "freeVariables" : [ "n", "x" ],
        "tokenTranslations" : {
          "K" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      },
      "numericResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "wasAborted" : false,
        "crashed" : false,
        "testCalculationsGroups" : [ ]
      },
      "symbolicResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    },
    "Maple" : {
      "translation" : "K[1](x ; n) = - 2*x + n",
      "translationInformation" : {
        "subEquations" : [ "K[1](x ; n) = - 2*x + n" ],
        "freeVariables" : [ "n", "x" ],
        "tokenTranslations" : {
          "K" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      },
      "numericResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "wasAborted" : false,
        "crashed" : false,
        "testCalculationsGroups" : [ ]
      },
      "symbolicResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    }
  },
  "positions" : [ {
    "section" : 0,
    "sentence" : 1,
    "word" : 9
  } ],
  "includes" : [ "n" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "first few polynomial",
    "score" : 0.6859086196238077
  } ]
}

Specify your own input