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 (s)_n = s (s+1)\cdots (s+n-1)}
... is translated to the CAS output ...
Semantic latex: \Pochhammersym{s}{n} = s(s + 1) \cdots(s + n - 1)
Confidence: 0.90733333333333
Mathematica
Translation: Pochhammer[s, n] == s*(s + 1) \[Ellipsis](s + n - 1)
Information
Sub Equations
- Pochhammer[s, n] = s*(s + 1) \[Ellipsis](s + n - 1)
Free variables
- n
- s
Symbol info
- Pochhammer symbol; Example: \Pochhammersym{a}{n}
Will be translated to: Pochhammer[$0, $1] Relevant links to definitions: DLMF: http://dlmf.nist.gov/5.2#iii Mathematica: https://reference.wolfram.com/language/ref/Pochhammer.html
Tests
Symbolic
Test expression: (Pochhammer[s, n])-(s*(s + 1) \[Ellipsis](s + n - 1))
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: \Pochhammersym [\Pochhammersym]
Tests
Symbolic
Numeric
Maple
Translation: pochhammer(s, n) = s*(s + 1) .. (s + n - 1)
Information
Sub Equations
- pochhammer(s, n) = s*(s + 1) .. (s + n - 1)
Free variables
- n
- s
Symbol info
- Pochhammer symbol; Example: \Pochhammersym{a}{n}
Will be translated to: pochhammer($0, $1) Relevant links to definitions: DLMF: http://dlmf.nist.gov/5.2#iii Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=pochhammer
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- Pochhammer symbol
- asymptotic expansion
Complete translation information:
{
"id" : "FORMULA_433598fbd34d738bce55f4bba927e69a",
"formula" : "(s)_n = s (s+1)\\cdots (s+n-1)",
"semanticFormula" : "\\Pochhammersym{s}{n} = s(s + 1) \\cdots(s + n - 1)",
"confidence" : 0.9073333333333333,
"translations" : {
"Mathematica" : {
"translation" : "Pochhammer[s, n] == s*(s + 1) \\[Ellipsis](s + n - 1)",
"translationInformation" : {
"subEquations" : [ "Pochhammer[s, n] = s*(s + 1) \\[Ellipsis](s + n - 1)" ],
"freeVariables" : [ "n", "s" ],
"tokenTranslations" : {
"\\Pochhammersym" : "Pochhammer symbol; Example: \\Pochhammersym{a}{n}\nWill be translated to: Pochhammer[$0, $1]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/5.2#iii\nMathematica: https://reference.wolfram.com/language/ref/Pochhammer.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" : "Pochhammer[s, n]",
"rhs" : "s*(s + 1) \\[Ellipsis](s + n - 1)",
"testExpression" : "(Pochhammer[s, n])-(s*(s + 1) \\[Ellipsis](s + n - 1))",
"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: \\Pochhammersym [\\Pochhammersym]"
}
}
},
"Maple" : {
"translation" : "pochhammer(s, n) = s*(s + 1) .. (s + n - 1)",
"translationInformation" : {
"subEquations" : [ "pochhammer(s, n) = s*(s + 1) .. (s + n - 1)" ],
"freeVariables" : [ "n", "s" ],
"tokenTranslations" : {
"\\Pochhammersym" : "Pochhammer symbol; Example: \\Pochhammersym{a}{n}\nWill be translated to: pochhammer($0, $1)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/5.2#iii\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=pochhammer"
}
}
}
},
"positions" : [ {
"section" : 6,
"sentence" : 1,
"word" : 28
} ],
"includes" : [ "s" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "Pochhammer symbol",
"score" : 0.722
}, {
"definition" : "asymptotic expansion",
"score" : 0.5500952380952381
} ]
}