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 I_x(a,b) }

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

Semantic latex: \normincBetaI{x}@{a}{b}

Confidence: 0.86273327448479

Mathematica

Translation: BetaRegularized[x, a, b]

Information

Sub Equations

  • BetaRegularized[x, a, b]

Free variables

  • a
  • b
  • x

Symbol info

  • Regularized incomplete Beta function; Example: \normincBetaI{x}@{a}{b}

Will be translated to: BetaRegularized[$0, $1, $2] Relevant links to definitions: DLMF: http://dlmf.nist.gov/8.17#E2 Mathematica: https://reference.wolfram.com/language/ref/BetaRegularized.html

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

  • (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \normincBetaI [\normincBetaI]

Tests

Symbolic
Numeric

Maple

Translation:

Information

Symbol info

  • (LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \normincBetaI [\normincBetaI]

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Description

  • x
  • b
  • Beta
  • Mathematica
  • complete beta function
  • cumulative distribution function of the beta distribution
  • term of the incomplete beta function
  • incomplete beta function
  • cumulative distribution function
  • regularized incomplete beta function
  • regularized beta function
  • binomial distribution with probability
  • number of Bernoulli trial
  • single success

Complete translation information:

{
  "id" : "FORMULA_d8c43c58ccc479670095603c5e824284",
  "formula" : "I_x(a,b)",
  "semanticFormula" : "\\normincBetaI{x}@{a}{b}",
  "confidence" : 0.8627332744847855,
  "translations" : {
    "Mathematica" : {
      "translation" : "BetaRegularized[x, a, b]",
      "translationInformation" : {
        "subEquations" : [ "BetaRegularized[x, a, b]" ],
        "freeVariables" : [ "a", "b", "x" ],
        "tokenTranslations" : {
          "\\normincBetaI" : "Regularized incomplete Beta function; Example: \\normincBetaI{x}@{a}{b}\nWill be translated to: BetaRegularized[$0, $1, $2]\nRelevant links to definitions:\nDLMF:         http://dlmf.nist.gov/8.17#E2\nMathematica:  https://reference.wolfram.com/language/ref/BetaRegularized.html"
        }
      },
      "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" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\normincBetaI [\\normincBetaI]"
        }
      },
      "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" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \\normincBetaI [\\normincBetaI]"
        }
      },
      "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" : 10,
    "sentence" : 4,
    "word" : 23
  } ],
  "includes" : [ "x" ],
  "isPartOf" : [ "F(k;\\,n,p) = \\Pr\\left(X \\le k\\right) = I_{1-p}(n-k, k+1) = 1 - I_p(k+1,n-k)", "\\begin{align}I_0(a,b) &= 0 \\\\I_1(a,b) &= 1 \\\\I_x(a,1) &= x^a\\\\I_x(1,b) &= 1 - (1-x)^b \\\\I_x(a,b) &= 1 - I_{1-x}(b,a) \\\\I_x(a+1,b) &= I_x(a,b)-\\frac{x^a(1-x)^b}{a \\Beta(a,b)} \\\\I_x(a,b+1) &= I_x(a,b)+\\frac{x^a(1-x)^b}{b \\Beta(a,b)} \\\\\\Beta(x;a,b)&=(-1)^{a} \\Beta\\left(\\frac{x}{x-1};a,1-a-b\\right)\\end{align}", "I_x(a,b) = \\frac{\\Beta(x;\\,a,b)}{\\Beta(a,b)}" ],
  "definiens" : [ {
    "definition" : "x",
    "score" : 0.7244849196070415
  }, {
    "definition" : "b",
    "score" : 0.6654396533069242
  }, {
    "definition" : "Beta",
    "score" : 0.6288842031023242
  }, {
    "definition" : "Mathematica",
    "score" : 0.6288842031023242
  }, {
    "definition" : "complete beta function",
    "score" : 0.35162935208770185
  }, {
    "definition" : "cumulative distribution function of the beta distribution",
    "score" : 0.32506405153002776
  }, {
    "definition" : "term of the incomplete beta function",
    "score" : 0.3249394612202381
  }, {
    "definition" : "incomplete beta function",
    "score" : 0.2852301111990206
  }, {
    "definition" : "cumulative distribution function",
    "score" : 0.23797293143965273
  }, {
    "definition" : "regularized incomplete beta function",
    "score" : 0.23784834112986297
  }, {
    "definition" : "regularized beta function",
    "score" : 0.18912607969166847
  }, {
    "definition" : "binomial distribution with probability",
    "score" : 0.1440628574876695
  }, {
    "definition" : "number of Bernoulli trial",
    "score" : 0.07564759407391171
  }, {
    "definition" : "single success",
    "score" : 0.07564759407391171
  } ]
}

Specify your own input