Skip to content

feat: add opt-in OCR PDF indexing#363

Closed
raoabinav wants to merge 7 commits into
StarTrail-org:mainfrom
raoabinav:feat/ocr-pdf-indexing
Closed

feat: add opt-in OCR PDF indexing#363
raoabinav wants to merge 7 commits into
StarTrail-org:mainfrom
raoabinav:feat/ocr-pdf-indexing

Conversation

@raoabinav

Copy link
Copy Markdown
Contributor

Evaluator Summary

  • Abi added opt-in OCR indexing for scanned and image-heavy PDFs, so LEANN can retrieve content from documents that normal embedded-text extraction would miss.
  • Design choice: OCR is only enabled through leann build --enable-ocr and only runs on pages without embedded text, preserving the fast default path for ordinary PDFs.
  • The implementation covers directory-discovered PDFs and explicit PDF file inputs, adds an OCR example app, documents the optional dependency and Tesseract binary requirement, and keeps OCR behavior isolated from normal text ingestion.
  • Quality bar: 7 targeted tests cover blank-page OCR, text-page skipping, explicit-file handling, and dependency stubs, plus lint, format, type, lockfile, and whitespace checks.

@raoabinav

Copy link
Copy Markdown
Contributor Author

Parking this PR for now to keep the review queue focused on #347. I’ll revisit/reopen this work later as a smaller clean PR once the content-hash PR lands.

@raoabinav raoabinav closed this Jun 6, 2026
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