Implement equation extraction (font/Unicode detection + required batched Engine call) - #2
Open
lorenzoliuzzo wants to merge 1 commit into
Open
Implement equation extraction (font/Unicode detection + required batched Engine call)#2lorenzoliuzzo wants to merge 1 commit into
lorenzoliuzzo wants to merge 1 commit into
Conversation
…d batched Engine call, Workspace PR Flags math-typeset regions by font family (CM*/Symbol) or Greek/math-Unicode character ratio, clusters adjacent flagged lines into multi-line equations, and crops each to an image. Every detected region is batched into one required Engine call per document -- there is no deterministic math-to-LaTeX path -- transcribing to LaTeX and grounding each symbol's meaning in nearby prose, with an ungrounded symbol staying "" rather than invented. Writes region crops + index.json + a rendered README per document.
lorenzoliuzzo
marked this pull request as ready for review
July 12, 2026 20:23
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds the tool out from the pristine my-template stub to parity with my-figure.
extract.py: PyMuPDF-based region detection via math-font family (CM*/Symbol) or Greek/math-Unicode character ratio, clustering adjacent flagged lines into multi-line equations, cropped to images.tool.py: realLEDGER_KIND=equation_extract; every region is batched into one required Engine call per document (no deterministic math-to-LaTeX path exists), producing LaTeX + per-symbol meanings grounded in nearby prose; ungrounded symbols stay"". Writesequations/<doc-id>/{crops, index.json, README.md}.Part of finishing MyFigure/MyTables/MyEquations to parity before wiring any of them into MyTypster.