Typst Mathematical Expression OCR based on TrOCR.
Clone this repo and enter it:
git clone https://github.com/ParaN3xus/typress
cd typress
We use uv to manage project dependencies. If you don't have uv installed, please follow the instructions on the uv installation page.
Install dependencies:
uv sync
Ensure you are in the repo root directory and execute
uv run -m typress
Create a .env file in the repo root directory with the following content:
MODEL_PATH=path/to/your/model
API_ROOT_URL=https://api.example.com/typress
To run the application in production mode, it is recommended to use a production-grade WSGI server such as gunicorn:
gunicorn --bind 0.0.0.0:8000 wsgi:app
spacing.seq2seqtrainer~~If you have a collection of Typst mathematical formula text (which can be included in Typst documents), you can create a dataset by running the following command in the Typst workspace root:
uv run -m typress.dataset extract
Then, submit the generated out.json file to us via email at paran3xus007@gmail.com. By submitting your data to us, you agree to make your dataset publicly available.
We welcome any code contributions, including bug fixes, feature additions, etc. If you're unsure where to start, you can refer to our Todo list.
This repository is published under an MIT License. See LICENSE file
This project makes use of the following open-source projects or datasets:
Thanks to the developers and contributors of these projects for their hard work and dedication.
Thanks to sjfhsjfh, Naptie, Mivik for providing Typst mathematical formula data.
$ claude mcp add typress \
-- python -m otcore.mcp_server <graph>