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 F(x; k) = u}

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

Semantic latex: F(x; k) = u

Confidence: 0

Mathematica

Translation: F[x ; k] == u

Information

Sub Equations

  • F[x ; k] = u

Free variables

  • k
  • u
  • x

Symbol info

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

Tests

Symbolic

Test expression: (F*(x ; k))-(u)

ERROR:

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

SymPy

Translation: F(x ; k) == u

Information

Sub Equations

  • F(x ; k) = u

Free variables

  • k
  • u
  • x

Symbol info

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

Tests

Symbolic
Numeric

Maple

Translation: F(x ; k) = u

Information

Sub Equations

  • F(x ; k) = u

Free variables

  • k
  • u
  • 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

  • k
  • elliptic integral of the first kind
  • substitution
  • article
  • benchmark entry
  • Elliptic integral
  • appropriate translation
  • ArcSin
  • ellipticf
  • first argument
  • JacobiSN
  • Mathematica
  • note that the second argument
  • such complex translation from semantic latex
  • u
  • u While lct
  • example
  • connection
  • dependency
  • additional dependency in the dependency graph
  • part of an equation
  • multi-equation
  • extra moi

Complete translation information:

{
  "id" : "FORMULA_42474c3f2c648ff2b9824815e2727dbd",
  "formula" : "F(x; k) = u",
  "semanticFormula" : "F(x; k) = u",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "F[x ; k] == u",
      "translationInformation" : {
        "subEquations" : [ "F[x ; k] = u" ],
        "freeVariables" : [ "k", "u", "x" ],
        "tokenTranslations" : {
          "F" : "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" : "ERROR",
        "numberOfTests" : 1,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 1,
        "crashed" : false,
        "testCalculationsGroup" : [ {
          "lhs" : "F*(x ; k)",
          "rhs" : "u",
          "testExpression" : "(F*(x ; k))-(u)",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "F(x ; k) == u",
      "translationInformation" : {
        "subEquations" : [ "F(x ; k) = u" ],
        "freeVariables" : [ "k", "u", "x" ],
        "tokenTranslations" : {
          "F" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      }
    },
    "Maple" : {
      "translation" : "F(x ; k) = u",
      "translationInformation" : {
        "subEquations" : [ "F(x ; k) = u" ],
        "freeVariables" : [ "k", "u", "x" ],
        "tokenTranslations" : {
          "F" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      }
    }
  },
  "positions" : [ {
    "section" : 8,
    "sentence" : 4,
    "word" : 17
  }, {
    "section" : 8,
    "sentence" : 6,
    "word" : 6
  }, {
    "section" : 8,
    "sentence" : 10,
    "word" : 30
  }, {
    "section" : 8,
    "sentence" : 12,
    "word" : 7
  } ],
  "includes" : [ "=", "F", "x", "F(x; k)" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "k",
    "score" : 0.7306228940788949
  }, {
    "definition" : "elliptic integral of the first kind",
    "score" : 0.722
  }, {
    "definition" : "substitution",
    "score" : 0.6424468626981997
  }, {
    "definition" : "article",
    "score" : 0.6288842031023242
  }, {
    "definition" : "benchmark entry",
    "score" : 0.6288842031023242
  }, {
    "definition" : "Elliptic integral",
    "score" : 0.6288842031023242
  }, {
    "definition" : "appropriate translation",
    "score" : 0.5775629775816605
  }, {
    "definition" : "ArcSin",
    "score" : 0.5775629775816605
  }, {
    "definition" : "ellipticf",
    "score" : 0.5775629775816605
  }, {
    "definition" : "first argument",
    "score" : 0.5775629775816605
  }, {
    "definition" : "JacobiSN",
    "score" : 0.5775629775816605
  }, {
    "definition" : "Mathematica",
    "score" : 0.5775629775816605
  }, {
    "definition" : "note that the second argument",
    "score" : 0.5775629775816605
  }, {
    "definition" : "such complex translation from semantic latex",
    "score" : 0.5775629775816605
  }, {
    "definition" : "u",
    "score" : 0.5775629775816605
  }, {
    "definition" : "u While lct",
    "score" : 0.5775629775816605
  }, {
    "definition" : "example",
    "score" : 0.5329047619047619
  }, {
    "definition" : "connection",
    "score" : 0.3463967148619029
  }, {
    "definition" : "dependency",
    "score" : 0.32739553012332934
  }, {
    "definition" : "additional dependency in the dependency graph",
    "score" : 0.3065627745308957
  }, {
    "definition" : "part of an equation",
    "score" : 0.21058333333333334
  }, {
    "definition" : "multi-equation",
    "score" : 0.16539552081954464
  }, {
    "definition" : "extra moi",
    "score" : 0.12704740271972384
  } ]
}

Specify your own input