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 2^{4} = 2 \times2 \times 2 \times 2 = 16}
... is translated to the CAS output ...
Semantic latex: 2^{4} = 2 \times2 \times 2 \times 2 = 16
Confidence: 0
Mathematica
Translation: (2)^(4) == 2 * 2 * 2 * 2 == 16
Information
Sub Equations
- (2)^(4) = 2 * 2 * 2 * 2
- 2 * 2 * 2 * 2 = 16
Symbol info
- was translated to: *
Tests
Symbolic
Test expression: ((2)^(4))-(2 * 2 * 2 * 2)
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Test expression: (2 * 2 * 2 * 2)-(16)
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation: (2)**(4) == 2 * 2 * 2 * 2 == 16
Information
Sub Equations
- (2)**(4) = 2 * 2 * 2 * 2
- 2 * 2 * 2 * 2 = 16
Symbol info
- was translated to: *
Tests
Symbolic
Numeric
Maple
Translation: (2)^(4) = 2 * 2 * 2 * 2 = 16
Information
Sub Equations
- (2)^(4) = 2 * 2 * 2 * 2
- 2 * 2 * 2 * 2 = 16
Symbol info
- was translated to: *
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- time
- TeX Source
- Gold ID
- Formula
- link
- times2
Complete translation information:
{
"id" : "FORMULA_579837194f2124b255d579031524a91c",
"formula" : "2^{4} = 2 \\times2 \\times 2 \\times 2 = 16",
"semanticFormula" : "2^{4} = 2 \\times2 \\times 2 \\times 2 = 16",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "(2)^(4) == 2 * 2 * 2 * 2 == 16",
"translationInformation" : {
"subEquations" : [ "(2)^(4) = 2 * 2 * 2 * 2", "2 * 2 * 2 * 2 = 16" ],
"tokenTranslations" : {
"\\times" : "was translated to: *"
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "ERROR",
"numberOfTests" : 2,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 2,
"crashed" : false,
"testCalculationsGroup" : [ {
"lhs" : "(2)^(4)",
"rhs" : "2 * 2 * 2 * 2",
"testExpression" : "((2)^(4))-(2 * 2 * 2 * 2)",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
}, {
"lhs" : "2 * 2 * 2 * 2",
"rhs" : "16",
"testExpression" : "(2 * 2 * 2 * 2)-(16)",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "(2)**(4) == 2 * 2 * 2 * 2 == 16",
"translationInformation" : {
"subEquations" : [ "(2)**(4) = 2 * 2 * 2 * 2", "2 * 2 * 2 * 2 = 16" ],
"tokenTranslations" : {
"\\times" : "was translated to: *"
}
}
},
"Maple" : {
"translation" : "(2)^(4) = 2 * 2 * 2 * 2 = 16",
"translationInformation" : {
"subEquations" : [ "(2)^(4) = 2 * 2 * 2 * 2", "2 * 2 * 2 * 2 = 16" ],
"tokenTranslations" : {
"\\times" : "was translated to: *"
}
}
}
},
"positions" : [ {
"section" : 1,
"sentence" : 0,
"word" : 8
} ],
"includes" : [ "2^{4} = 2", "2 = 16" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "time",
"score" : 0.7936682821800771
}, {
"definition" : "TeX Source",
"score" : 0.722
}, {
"definition" : "Gold ID",
"score" : 0.6954080343007951
}, {
"definition" : "Formula",
"score" : 0.6687181434333315
}, {
"definition" : "link",
"score" : 0.6687181434333315
}, {
"definition" : "times2",
"score" : 0.6687181434333315
} ]
}