Refactor groundmark as thin wrapper on anchorite#1
Open
lgruen-vcgs wants to merge 2 commits intomainfrom
Open
Conversation
Update LICENSE copyright to Centre for Population Genomics, add new logo, and rewrite README to reflect the provider-agnostic scope (Pydantic AI + docling-parse replacing Gemini + Document AI).
922ea3c to
5dd2260
Compare
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.
Summary
Rewrites groundmark (forked from gemini-ocr) as a batteries-included wrapper around anchorite. Give it a PDF + model string, get annotated Markdown with embedded bounding box coordinates.
What groundmark provides (concrete anchorite provider implementations):
PydanticAIMarkdownProvider— PDF-to-Markdown via any Pydantic AI model, with a line-number workaround for Claude's content filterPdfplumberAnchorProvider— line-level bbox extraction via pdfplumber (MIT), with table detection and ligature decompositionWhat anchorite provides (delegated entirely):
<span>injection), stripping, fuzzy quote resolutionKey changes from gemini-ocr
process()entry point with chunking supportWhat's left (4 source files)
process.pyanchorite.process_document()markdown.pyMarkdownProvider— Pydantic AI + prompt + line-number workaroundparse.pyAnchorProvider— pdfplumber extraction with table detectionvisualize.pyTest plan
uv run pytest tests/ -x -q— 6 tests passuv run ruff check src/ tests/— cleanvisualize.pyruns against a real PDF with the anchorite fix branch