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 H_n = P_1(y)+P_2(y)F(y)}
... is translated to the CAS output ...
Semantic latex: \HeavisideH@{x}_n = P_1(y) + P_2(y) F(y)
Confidence: 0.45649673482167
Mathematica
Translation: Subscript[HeavisideTheta[x], n] == Subscript[P, 1][y]+ Subscript[P, 2][y]* F[y]
Information
Sub Equations
- Subscript[HeavisideTheta[x], n] = Subscript[P, 1][y]+ Subscript[P, 2][y]* F[y]
Free variables
- n
- x
- y
Symbol info
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Heaviside step function; Example: \HeavisideH@{x}
Will be translated to: HeavisideTheta[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.16#E13 Mathematica: https://reference.wolfram.com/language/ref/HeavisideTheta.html
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
Tests
Symbolic
Numeric
SymPy
Translation:
Information
Symbol info
- (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \HeavisideH [\HeavisideH]
Tests
Symbolic
Numeric
Maple
Translation: Heaviside(x)[n] = P[1](y)+ P[2](y)* F(y)
Information
Sub Equations
- Heaviside(x)[n] = P[1](y)+ P[2](y)* F(y)
Free variables
- n
- x
- y
Symbol info
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Heaviside step function; Example: \HeavisideH@{x}
Will be translated to: Heaviside($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.16#E13 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Heaviside
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- polynomial
Complete translation information:
{
"id" : "FORMULA_6d6baea06eb521c0f499a9f5007ccb33",
"formula" : "H_n = P_1(y)+P_2(y)F(y)",
"semanticFormula" : "\\HeavisideH@{x}_n = P_1(y) + P_2(y) F(y)",
"confidence" : 0.4564967348216724,
"translations" : {
"Mathematica" : {
"translation" : "Subscript[HeavisideTheta[x], n] == Subscript[P, 1][y]+ Subscript[P, 2][y]* F[y]",
"translationInformation" : {
"subEquations" : [ "Subscript[HeavisideTheta[x], n] = Subscript[P, 1][y]+ Subscript[P, 2][y]* F[y]" ],
"freeVariables" : [ "n", "x", "y" ],
"tokenTranslations" : {
"P" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\HeavisideH" : "Heaviside step function; Example: \\HeavisideH@{x}\nWill be translated to: HeavisideTheta[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/1.16#E13\nMathematica: https://reference.wolfram.com/language/ref/HeavisideTheta.html",
"F" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
}
},
"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" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\HeavisideH [\\HeavisideH]"
}
},
"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" : "Heaviside(x)[n] = P[1](y)+ P[2](y)* F(y)",
"translationInformation" : {
"subEquations" : [ "Heaviside(x)[n] = P[1](y)+ P[2](y)* F(y)" ],
"freeVariables" : [ "n", "x", "y" ],
"tokenTranslations" : {
"P" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\HeavisideH" : "Heaviside step function; Example: \\HeavisideH@{x}\nWill be translated to: Heaviside($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/1.16#E13\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Heaviside",
"F" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
}
},
"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" : 9,
"word" : 6
} ],
"includes" : [ "F(x)", "y", "n", "F(y)", "P_1", "P_2", "H_n" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "polynomial",
"score" : 0.6859086196238077
} ]
}