Skip to content

Commit

Permalink
add another method
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterFavero committed Apr 13, 2024
1 parent 8f8c2e9 commit d635fe6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion ml-model/mathpix/ml-benchmarking/benchmark.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,20 @@
" for arg in expr.args:\n",
" child_node = sympy_to_zss(arg)\n",
" node.addkid(child_node)\n",
" return node"
" return node\n",
"\n",
"\n",
"# Input is string of LaTeX source code. Runs sympy parser and ZSS tree parser.\n",
"# Returns parsed ZSS tree.\n",
"def source_to_zss(latex_expr):\n",
" print('Started: ' + latex_expr)\n",
" sympy_expr = parse_latex('latex_expr')\n",
" print('SymPy')\n",
" zss_tree = sympy_to_zss(sympy_expr)\n",
" print('ZSS')\n",
" print(type(zss_tree))\n",
" print()\n",
" return zss_tree"
]
}
],
Expand Down

0 comments on commit d635fe6

Please sign in to comment.