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 \sin(ku)}
... is translated to the CAS output ...
Semantic latex: \sin(ku)
Confidence: 0
Mathematica
Translation: Sin[k*u]
Information
Sub Equations
- Sin[k*u]
Free variables
- k
- u
Symbol info
- Sine; Example: \sin@@{z}
Will be translated to: Sin[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E1 Mathematica: https://reference.wolfram.com/language/ref/Sin.html
Tests
Symbolic
Numeric
SymPy
Translation: sin(k*u)
Information
Sub Equations
- sin(k*u)
Free variables
- k
- u
Symbol info
- Sine; Example: \sin@@{z}
Will be translated to: sin($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E1 SymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#sin
Tests
Symbolic
Numeric
Maple
Translation: sin(k*u)
Information
Sub Equations
- sin(k*u)
Free variables
- k
- u
Symbol info
- Sine; Example: \sin@@{z}
Will be translated to: sin($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E1 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=sin
Tests
Symbolic
Numeric
Dependency Graph Information
Description
- distribution
- exponential representation
- Fourier representation
- function
- principal value
- real axis
- respect
Complete translation information:
{
"id" : "FORMULA_4c2a96bd1b5091dd1a60b9ec05c28973",
"formula" : "\\sin(ku)",
"semanticFormula" : "\\sin(ku)",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "Sin[k*u]",
"translationInformation" : {
"subEquations" : [ "Sin[k*u]" ],
"freeVariables" : [ "k", "u" ],
"tokenTranslations" : {
"\\sin" : "Sine; Example: \\sin@@{z}\nWill be translated to: Sin[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E1\nMathematica: https://reference.wolfram.com/language/ref/Sin.html"
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ ]
}
},
"SymPy" : {
"translation" : "sin(k*u)",
"translationInformation" : {
"subEquations" : [ "sin(k*u)" ],
"freeVariables" : [ "k", "u" ],
"tokenTranslations" : {
"\\sin" : "Sine; Example: \\sin@@{z}\nWill be translated to: sin($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E1\nSymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#sin"
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ ]
}
},
"Maple" : {
"translation" : "sin(k*u)",
"translationInformation" : {
"subEquations" : [ "sin(k*u)" ],
"freeVariables" : [ "k", "u" ],
"tokenTranslations" : {
"\\sin" : "Sine; Example: \\sin@@{z}\nWill be translated to: sin($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E1\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=sin"
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ ]
}
}
},
"positions" : [ {
"section" : 2,
"sentence" : 2,
"word" : 32
} ],
"includes" : [ ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "distribution",
"score" : 0.6859086196238077
}, {
"definition" : "exponential representation",
"score" : 0.6859086196238077
}, {
"definition" : "Fourier representation",
"score" : 0.6859086196238077
}, {
"definition" : "function",
"score" : 0.6859086196238077
}, {
"definition" : "principal value",
"score" : 0.6859086196238077
}, {
"definition" : "real axis",
"score" : 0.6859086196238077
}, {
"definition" : "respect",
"score" : 0.6859086196238077
} ]
}