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 \sum_{j_7 j_8} (2j_7+1)(2j_8+1) \begin{Bmatrix} j_1 & j_2 & j_3\\ j_4 & j_5 & j_6\\ j_7 & j_8 & j_9 \end{Bmatrix} \begin{Bmatrix} j_1 & j_2 & j_3'\\ j_4 & j_5 & j_6'\\ j_7 & j_8 & j_9 \end{Bmatrix} = \frac{\delta_{j_3j_3'}\delta_{j_6j_6'} \begin{Bmatrix} j_1 & j_2 & j_3 \end{Bmatrix} \begin{Bmatrix} j_4 & j_5 & j_6\end{Bmatrix} \begin{Bmatrix} j_3 & j_6 & j_9 \end{Bmatrix}} {(2j_3+1)(2j_6+1)}}
... is translated to the CAS output ...
Semantic latex: \sum_{j_7 j_8}(2 j_7 + 1)(2 j_8 + 1) \Wignersixjsym{j_1}{j_2}{j_3}{j_4}{j_5}{j_6} \Wignersixjsym{j_1}{j_2}{j_3'}{j_4}{j_5}{j_6'} = \frac{\delta_{j_3j_3'}\delta_{j_6j_6'} \begin{Bmatrix} j_1 & j_2 & j_3 \end{Bmatrix} \begin{Bmatrix} j_4 & j_5 & j_6\end{Bmatrix} \begin{Bmatrix} j_3 & j_6 & j_9 \end{Bmatrix}} {(2j_3+1)(2j_6+1)}
Confidence: 0.74528225883953
Mathematica
Translation:
Information
Symbol info
- (LaTeX -> Mathematica) The input LaTeX is invalid: Primes can only be translated behind semantic macros (differentiation primes) but not in other places.
Tests
Symbolic
Numeric
SymPy
Translation:
Information
Symbol info
- (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \Wignersixjsym [\Wignersixjsym]
Tests
Symbolic
Numeric
Maple
Translation:
Information
Symbol info
- (LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \Wignersixjsym [\Wignersixjsym]
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
- Failed to parse (syntax error): {\displaystyle 8}(2}
- Failed to parse (syntax error): {\displaystyle 9} =}
Description
- Bmatrix
- end
- j_3
- j_6
- j_1
- j_2
- j_4
- j_5
- j_9
- 2j
- delta
- j_7
- j_8
- TeX Source
- Formula
- Gold ID
- j_3j_3
- j_6j_6
- j_7 j_8
- link
- sum
Complete translation information:
{
"id" : "FORMULA_08d08037d9e64d85aa3645470ce645af",
"formula" : "\\sum_{j_7 j_8} (2j_7+1)(2j_8+1) \\begin{Bmatrix} j_1 & j_2 & j_3\\\\ j_4 & j_5 & j_6\\\\ j_7 & j_8 & j_9 \\end{Bmatrix} \\begin{Bmatrix} j_1 & j_2 & j_3'\\\\ j_4 & j_5 & j_6'\\\\ j_7 & j_8 & j_9 \\end{Bmatrix} = \\frac{\\delta_{j_3j_3'}\\delta_{j_6j_6'} \\begin{Bmatrix} j_1 & j_2 & j_3 \\end{Bmatrix} \\begin{Bmatrix} j_4 & j_5 & j_6\\end{Bmatrix} \\begin{Bmatrix} j_3 & j_6 & j_9 \\end{Bmatrix}} {(2j_3+1)(2j_6+1)}",
"semanticFormula" : "\\sum_{j_7 j_8}(2 j_7 + 1)(2 j_8 + 1) \\Wignersixjsym{j_1}{j_2}{j_3}{j_4}{j_5}{j_6} \\Wignersixjsym{j_1}{j_2}{j_3'}{j_4}{j_5}{j_6'} = \\frac{\\delta_{j_3j_3'}\\delta_{j_6j_6'} \\begin{Bmatrix} j_1 & j_2 & j_3 \\end{Bmatrix} \\begin{Bmatrix} j_4 & j_5 & j_6\\end{Bmatrix} \\begin{Bmatrix} j_3 & j_6 & j_9 \\end{Bmatrix}} {(2j_3+1)(2j_6+1)}",
"confidence" : 0.7452822588395335,
"translations" : {
"Mathematica" : {
"translation" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> Mathematica) The input LaTeX is invalid: Primes can only be translated behind semantic macros (differentiation primes) but not in other places."
}
},
"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: \\Wignersixjsym [\\Wignersixjsym]"
}
},
"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" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \\Wignersixjsym [\\Wignersixjsym]"
}
},
"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" : 1,
"sentence" : 0,
"word" : 8
} ],
"includes" : [ "8}(2", "9} =" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "Bmatrix",
"score" : 0.9360785204379017
}, {
"definition" : "end",
"score" : 0.9122077619974053
}, {
"definition" : "j_3",
"score" : 0.8987125609391096
}, {
"definition" : "j_6",
"score" : 0.8987125609391096
}, {
"definition" : "j_1",
"score" : 0.8705484558333192
}, {
"definition" : "j_2",
"score" : 0.8705484558333192
}, {
"definition" : "j_4",
"score" : 0.8705484558333192
}, {
"definition" : "j_5",
"score" : 0.8705484558333192
}, {
"definition" : "j_9",
"score" : 0.8705484558333192
}, {
"definition" : "2j",
"score" : 0.8064005821790308
}, {
"definition" : "delta",
"score" : 0.8064005821790308
}, {
"definition" : "j_7",
"score" : 0.8064005821790308
}, {
"definition" : "j_8",
"score" : 0.8064005821790308
}, {
"definition" : "TeX Source",
"score" : 0.722
}, {
"definition" : "Formula",
"score" : 0.6539834495557804
}, {
"definition" : "Gold ID",
"score" : 0.6539834495557804
}, {
"definition" : "j_3j_3",
"score" : 0.6539834495557804
}, {
"definition" : "j_6j_6",
"score" : 0.6539834495557804
}, {
"definition" : "j_7 j_8",
"score" : 0.6539834495557804
}, {
"definition" : "link",
"score" : 0.6539834495557804
}, {
"definition" : "sum",
"score" : 0.6539834495557804
} ]
}