approach0 / search-engine

A math-aware search engine.
http://approach0.xyz
MIT License
346 stars 50 forks source link

Parsing optree to python program #36

Closed popcorn31029 closed 2 years ago

popcorn31029 commented 2 years ago

Excuse me, if I want to parse the operator tree generated by tex-parser to my python program to do other applications, how should I do? Maybe I can use the result of preorder output and inorder output to construct the original tree in python, but how should I revise the code to get the inorder output? Thanks for your help.

w32zhong commented 2 years ago

no need to parse the output, we have a python binding called pya0 for this search engine, it is also much more updated.

pip install pya0==0.3.4

You can check out example code for parsing here: https://github.com/approach0/pya0/blob/math-dense-retrievers-replication/tests/test-parser.py

popcorn31029 commented 2 years ago

I don't know why I couldn't install it. My OS is windows 10 ,and my Python is 3.8.8.

image

w32zhong commented 2 years ago

I see, it does not support the Windows platform actually. I do not have a plan to do it on Windows, it is mainly for my own use.

@popcorn31029