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 N \in \mathbb{N}, \Re a > 1}
... is translated to the CAS output ...
Semantic latex: N \in \mathbb{N}, \realpart a > 1
Confidence: 0
Mathematica
Translation: N \[Element]N Re[a] > 1
Information
Free variables
- N
- a
Symbol info
- Real part of a complex number; Example: \realpart@@{z}
Will be translated to: Re[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.9#E2 Mathematica: https://reference.wolfram.com/language/ref/Re.html
Tests
Symbolic
Test expression: N
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Test expression: N Re[a]
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: \realpart [\realpart]
Tests
Symbolic
Numeric
Maple
Translation: N in N; Re(a) > 1
Information
Free variables
- N
- a
Symbol info
- Real part of a complex number; Example: \realpart@@{z}
Will be translated to: Re($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.9#E2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Re
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Complete translation information:
{
"id" : "FORMULA_624d8eb25e114b5f60e6518dd2101c17",
"formula" : "N \\in \\mathbb{N}, \\realpart a > 1",
"semanticFormula" : "N \\in \\mathbb{N}, \\realpart a > 1",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "N \\[Element]N\n Re[a] > 1",
"translationInformation" : {
"freeVariables" : [ "N", "a" ],
"tokenTranslations" : {
"\\realpart" : "Real part of a complex number; Example: \\realpart@@{z}\nWill be translated to: Re[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/1.9#E2\nMathematica: https://reference.wolfram.com/language/ref/Re.html"
}
},
"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" : "N",
"rhs" : "",
"testExpression" : "N",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
}, {
"lhs" : "N\n Re[a]",
"rhs" : "",
"testExpression" : "N\n Re[a]",
"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: \\realpart [\\realpart]"
}
}
},
"Maple" : {
"translation" : "N in N; Re(a) > 1",
"translationInformation" : {
"freeVariables" : [ "N", "a" ],
"tokenTranslations" : {
"\\realpart" : "Real part of a complex number; Example: \\realpart@@{z}\nWill be translated to: Re($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/1.9#E2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Re"
}
}
}
},
"positions" : [ ],
"includes" : [ "a", "N \\in \\mathbb{N}" ],
"isPartOf" : [ ],
"definiens" : [ ]
}