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 a=\begin{cases}0;&\mbox{if }\chi(-1)=1, \\ 1;&\mbox{if }\chi(-1)=-1,\end{cases}}
... is translated to the CAS output ...
Semantic latex: a = \begin{cases}0; if \Dirichletchar@@{- 1}{k} = 1 , \Dirichletchar@@{}{k}\end{cases}
Confidence: 0.6036790666561
Mathematica
Translation: a ==
Information
Free variables
- a
Tests
Symbolic
Test expression: a
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation: a ==
Information
Free variables
- a
Tests
Symbolic
Numeric
Maple
Translation: a =
Information
Free variables
- a
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- Gamma function
- symbol
- functional equation
- Gauss sum
Complete translation information:
{
"id" : "FORMULA_fbba482a902c353b7c94115b3f304cea",
"formula" : "a=\\begin{cases}0;&\\mbox{if }\\chi(-1)=1, \\\\ 1;&\\mbox{if }\\chi(-1)=-1,\\end{cases}",
"semanticFormula" : "a = \\begin{cases}0; if \\Dirichletchar@@{- 1}{k} = 1 , \\Dirichletchar@@{}{k}\\end{cases}",
"confidence" : 0.6036790666560974,
"translations" : {
"Mathematica" : {
"translation" : "a == ",
"translationInformation" : {
"freeVariables" : [ "a" ]
},
"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" : "a",
"rhs" : "",
"testExpression" : "a",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "a == ",
"translationInformation" : {
"freeVariables" : [ "a" ]
}
},
"Maple" : {
"translation" : "a = ",
"translationInformation" : {
"freeVariables" : [ "a" ]
}
}
},
"positions" : [ {
"section" : 3,
"sentence" : 1,
"word" : 16
} ],
"includes" : [ "a", "\\chi", "\\chi(-1) = -1", "\\chi(-1) = 1" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "Gamma function",
"score" : 0.6859086196238077
}, {
"definition" : "symbol",
"score" : 0.6460746792928004
}, {
"definition" : "functional equation",
"score" : 0.5049074255814494
}, {
"definition" : "Gauss sum",
"score" : 0.5049074255814494
} ]
}