LaTeX to CAS translator
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 G(n)=\begin{cases} 0&\text{if }n=0,-1,-2,\dots\\ \prod_{i=0}^{n-2} i!&\text{if }n=1,2,\dots\end{cases}}
... is translated to the CAS output ...
Semantic latex: \BarnesG@{n} = \begin{cases} 0&\text{if }n=0,-1,-2,\dots\\ \prod_{i=0}^{n-2} i!&\text{if }n=1,2,\dots\end{cases}
Confidence: 0.72606363917343
Mathematica
Translation: BarnesG[n] ==
Information
Free variables
- n
Symbol info
- Double Gamma / Barnes Gamma; Example: \BarnesG@{z}
Will be translated to: BarnesG[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/5.17#E1 Mathematica: https://reference.wolfram.com/language/ref/BarnesG.html
Tests
Symbolic
Test expression: BarnesG[n]
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation:
Information
Symbol info
- (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \BarnesG [\BarnesG]
Tests
Symbolic
Numeric
Maple
Translation:
Information
Symbol info
- (LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \BarnesG [\BarnesG]
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- value at integer argument
- k-function
- functional equation
- gamma function
Complete translation information:
{
"id" : "FORMULA_23e4cef02c3a564e22687b8dd764d166",
"formula" : "G(n)=\\begin{cases} 0&\\text{if }n=0,-1,-2,\\dots\\\\ \\prod_{i=0}^{n-2} i!&\\text{if }n=1,2,\\dots\\end{cases}",
"semanticFormula" : "\\BarnesG@{n} = \\begin{cases} 0&\\text{if }n=0,-1,-2,\\dots\\\\ \\prod_{i=0}^{n-2} i!&\\text{if }n=1,2,\\dots\\end{cases}",
"confidence" : 0.7260636391734279,
"translations" : {
"Mathematica" : {
"translation" : "BarnesG[n] == ",
"translationInformation" : {
"freeVariables" : [ "n" ],
"tokenTranslations" : {
"\\BarnesG" : "Double Gamma / Barnes Gamma; Example: \\BarnesG@{z}\nWill be translated to: BarnesG[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/5.17#E1\nMathematica: https://reference.wolfram.com/language/ref/BarnesG.html"
}
},
"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" : "BarnesG[n]",
"rhs" : "",
"testExpression" : "BarnesG[n]",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\BarnesG [\\BarnesG]"
}
}
},
"Maple" : {
"translation" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \\BarnesG [\\BarnesG]"
}
}
}
},
"positions" : [ {
"section" : 1,
"sentence" : 2,
"word" : 14
} ],
"includes" : [ "G" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "value at integer argument",
"score" : 0.7125985104912714
}, {
"definition" : "k-function",
"score" : 0.6460746792928004
}, {
"definition" : "functional equation",
"score" : 0.5988174995334326
}, {
"definition" : "gamma function",
"score" : 0.5500952380952381
} ]
}