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 y = mx + n}

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

Semantic latex: y = mx + n

Confidence: 0

Mathematica

Translation: y == m*x + n

Information

Sub Equations

  • y = m*x + n

Free variables

  • m
  • n
  • x
  • y

Symbol info

  • Found a potential abbreviation. This program cannot translate abbreviations. Hence it was interpreted as a sequence of variable multiplications, e.g. 'etc' -> 'e*t*c'.

Tests

Symbolic

Test expression: (y)-(m*x + n)

ERROR:

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

SymPy

Translation: y == m*x + n

Information

Sub Equations

  • y = m*x + n

Free variables

  • m
  • n
  • x
  • y

Symbol info

  • Found a potential abbreviation. This program cannot translate abbreviations. Hence it was interpreted as a sequence of variable multiplications, e.g. 'etc' -> 'e*t*c'.

Tests

Symbolic
Numeric

Maple

Translation: y = m*x + n

Information

Sub Equations

  • y = m*x + n

Free variables

  • m
  • n
  • x
  • y

Symbol info

  • Found a potential abbreviation. This program cannot translate abbreviations. Hence it was interpreted as a sequence of variable multiplications, e.g. 'etc' -> 'e*t*c'.

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Description

  • form
  • point
  • equation of the tangent
  • line
  • inverse function

Complete translation information:

{
  "id" : "FORMULA_112d608d870114e7d8181ab6449003a2",
  "formula" : "y = mx + n",
  "semanticFormula" : "y = mx + n",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "y == m*x + n",
      "translationInformation" : {
        "subEquations" : [ "y = m*x + n" ],
        "freeVariables" : [ "m", "n", "x", "y" ],
        "tokenTranslations" : {
          "mx" : "Found a potential abbreviation. This program cannot translate abbreviations. Hence it was interpreted as a sequence of variable multiplications, e.g. 'etc' -> 'e*t*c'."
        }
      },
      "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" : "y",
          "rhs" : "m*x + n",
          "testExpression" : "(y)-(m*x + n)",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "y == m*x + n",
      "translationInformation" : {
        "subEquations" : [ "y = m*x + n" ],
        "freeVariables" : [ "m", "n", "x", "y" ],
        "tokenTranslations" : {
          "mx" : "Found a potential abbreviation. This program cannot translate abbreviations. Hence it was interpreted as a sequence of variable multiplications, e.g. 'etc' -> 'e*t*c'."
        }
      }
    },
    "Maple" : {
      "translation" : "y = m*x + n",
      "translationInformation" : {
        "subEquations" : [ "y = m*x + n" ],
        "freeVariables" : [ "m", "n", "x", "y" ],
        "tokenTranslations" : {
          "mx" : "Found a potential abbreviation. This program cannot translate abbreviations. Hence it was interpreted as a sequence of variable multiplications, e.g. 'etc' -> 'e*t*c'."
        }
      }
    }
  },
  "positions" : [ {
    "section" : 12,
    "sentence" : 5,
    "word" : 11
  } ],
  "includes" : [ "y", "n" ],
  "isPartOf" : [ "y = mx + d,\\ d \\ne 0" ],
  "definiens" : [ {
    "definition" : "form",
    "score" : 0.722
  }, {
    "definition" : "point",
    "score" : 0.7087082248486866
  }, {
    "definition" : "equation of the tangent",
    "score" : 0.6629879847031728
  }, {
    "definition" : "line",
    "score" : 0.4331635528198964
  }, {
    "definition" : "inverse function",
    "score" : 0.31917846089364893
  } ]
}

Specify your own input