Skip to content

feat: add structured document recognition - #16

Merged
privatenumber merged 11 commits into
developfrom
docs/vision-document-research
Aug 10, 2026
Merged

privatenumber merged 11 commits into
developfrom
docs/vision-document-research

Conversation

@privatenumber

@privatenumber privatenumber commented Aug 9, 2026 •

Copy link
Copy Markdown
Owner

Problem

mac-ocr can return flat OCR lines, but callers processing receipts, forms, and tables must infer paragraphs, list items, rows, and merged cells themselves. macOS 26 provides Vision document recognition for this structure, but the CLI had no way to expose it without changing the established OCR schema.

For example, a table scan can contain ALPHA, BETA, GAMMA, and DELTA as independent lines. A caller cannot reliably recover the original row and column relationships from that flat result alone.

Changes

Add a macOS 26-only mac-ocr document command with a versioned mac-ocr-owned result schema. It returns root text plus recursive paragraphs, tables, lists, cells, line candidates, and top-left geometry, so consumers receive the recognized document structure directly.

Older macOS versions return a typed unavailable error instead of attempting an unsupported Vision request. Existing OCR and searchable-PDF APIs remain unchanged. This PR establishes the native document core and CLI contract; a following PR will expose the same result through the shared Node service.

@privatenumber
privatenumber marked this pull request as ready for review August 10, 2026 02:22
@privatenumber
privatenumber merged commit 3964798 into develop Aug 10, 2026
2 checks passed
@privatenumber
privatenumber deleted the docs/vision-document-research branch August 10, 2026 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant