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 \frac{(x - 2)x + 4y(y - 1)}{yx - (y - 1)(x - 2)} = 0}
... is translated to the CAS output ...
Semantic latex: \frac{(x - 2)x + 4y(y - 1)}{yx - (y - 1)(x - 2)} = 0
Confidence: 0
Mathematica
Translation: Divide[(x - 2)*x + 4*y*(y - 1),y*x -(y - 1)*(x - 2)] == 0
Information
Sub Equations
- Divide[(x - 2)*x + 4*y*(y - 1),y*x -(y - 1)*(x - 2)] = 0
Free variables
- x
- y
Tests
Symbolic
Test expression: (Divide[(x - 2)*x + 4*y*(y - 1),y*x -(y - 1)*(x - 2)])-(0)
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation: ((x - 2)*x + 4*y*(y - 1))/(y*x -(y - 1)*(x - 2)) == 0
Information
Sub Equations
- ((x - 2)*x + 4*y*(y - 1))/(y*x -(y - 1)*(x - 2)) = 0
Free variables
- x
- y
Tests
Symbolic
Numeric
Maple
Translation: ((x - 2)*x + 4*y*(y - 1))/(y*x -(y - 1)*(x - 2)) = 0
Information
Sub Equations
- ((x - 2)*x + 4*y*(y - 1))/(y*x -(y - 1)*(x - 2)) = 0
Free variables
- x
- y
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- three-point form
- conversion
- example
Complete translation information:
{
"id" : "FORMULA_12923a142cac0b07914b5aadd56ad949",
"formula" : "\\frac{(x - 2)x + 4y(y - 1)}{yx - (y - 1)(x - 2)} = 0",
"semanticFormula" : "\\frac{(x - 2)x + 4y(y - 1)}{yx - (y - 1)(x - 2)} = 0",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "Divide[(x - 2)*x + 4*y*(y - 1),y*x -(y - 1)*(x - 2)] == 0",
"translationInformation" : {
"subEquations" : [ "Divide[(x - 2)*x + 4*y*(y - 1),y*x -(y - 1)*(x - 2)] = 0" ],
"freeVariables" : [ "x", "y" ]
},
"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" : "Divide[(x - 2)*x + 4*y*(y - 1),y*x -(y - 1)*(x - 2)]",
"rhs" : "0",
"testExpression" : "(Divide[(x - 2)*x + 4*y*(y - 1),y*x -(y - 1)*(x - 2)])-(0)",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "((x - 2)*x + 4*y*(y - 1))/(y*x -(y - 1)*(x - 2)) == 0",
"translationInformation" : {
"subEquations" : [ "((x - 2)*x + 4*y*(y - 1))/(y*x -(y - 1)*(x - 2)) = 0" ],
"freeVariables" : [ "x", "y" ]
}
},
"Maple" : {
"translation" : "((x - 2)*x + 4*y*(y - 1))/(y*x -(y - 1)*(x - 2)) = 0",
"translationInformation" : {
"subEquations" : [ "((x - 2)*x + 4*y*(y - 1))/(y*x -(y - 1)*(x - 2)) = 0" ],
"freeVariables" : [ "x", "y" ]
}
}
},
"positions" : [ {
"section" : 33,
"sentence" : 1,
"word" : 12
} ],
"includes" : [ "= 0", "y", "x", "y(x)" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "three-point form",
"score" : 0.722
}, {
"definition" : "conversion",
"score" : 0.6859086196238077
}, {
"definition" : "example",
"score" : 0.6859086196238077
} ]
}