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 (-1)^{k+1} B_k }
... is translated to the CAS output ...
Semantic latex: (- 1)^{k+1} \BernoullinumberB{k}
Confidence: 0.8820248930976
Mathematica
Translation: (- 1)^(k + 1)* BernoulliB[k]
Information
Sub Equations
- (- 1)^(k + 1)* BernoulliB[k]
Free variables
- k
Symbol info
- Bernoulli polynomial; Example: \BernoullinumberB{n}
Will be translated to: BernoulliB[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/24.2#i Mathematica: https://reference.wolfram.com/language/ref/BernoulliB.html
Tests
Symbolic
Numeric
SymPy
Translation:
Information
Symbol info
- (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \BernoullinumberB [\BernoullinumberB]
Tests
Symbolic
Numeric
Maple
Translation: (- 1)^(k + 1)* bernoulli(k)
Information
Sub Equations
- (- 1)^(k + 1)* bernoulli(k)
Free variables
- k
Symbol info
- Bernoulli polynomial; Example: \BernoullinumberB{n}
Will be translated to: bernoulli($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/24.2#i Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=bernoulli
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- note
- Bernoulli number
- convention
- time of Barnes
Complete translation information:
{
"id" : "FORMULA_0c049a6b0b34e7ff56d358c29f091c5d",
"formula" : "(-1)^{k+1} B_k",
"semanticFormula" : "(- 1)^{k+1} \\BernoullinumberB{k}",
"confidence" : 0.8820248930976001,
"translations" : {
"Mathematica" : {
"translation" : "(- 1)^(k + 1)* BernoulliB[k]",
"translationInformation" : {
"subEquations" : [ "(- 1)^(k + 1)* BernoulliB[k]" ],
"freeVariables" : [ "k" ],
"tokenTranslations" : {
"\\BernoullinumberB" : "Bernoulli polynomial; Example: \\BernoullinumberB{n}\nWill be translated to: BernoulliB[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/24.2#i\nMathematica: https://reference.wolfram.com/language/ref/BernoulliB.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" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\BernoullinumberB [\\BernoullinumberB]"
}
},
"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" : "(- 1)^(k + 1)* bernoulli(k)",
"translationInformation" : {
"subEquations" : [ "(- 1)^(k + 1)* bernoulli(k)" ],
"freeVariables" : [ "k" ],
"tokenTranslations" : {
"\\BernoullinumberB" : "Bernoulli polynomial; Example: \\BernoullinumberB{n}\nWill be translated to: bernoulli($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/24.2#i\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=bernoulli"
}
},
"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" : 7,
"sentence" : 1,
"word" : 19
} ],
"includes" : [ "B_k" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "note",
"score" : 0.6859086196238077
}, {
"definition" : "Bernoulli number",
"score" : 0.6460746792928004
}, {
"definition" : "convention",
"score" : 0.6460746792928004
}, {
"definition" : "time of Barnes",
"score" : 0.5988174995334326
} ]
}