This repository contains a Prodigy plugin with recipes for image- and text-based annotation of PDF files, as well as recipes for OCR (Optical Character Recognition) to extract content from documents. The pdf.spans.manual
recipe uses spacy-layout
and Docling to extract the text contents from PDFs and lets you annotate spans of text, with an optional side-by-side preview of the original document and pre-fetching for faster loading during annotation.
You can install this plugin via pip
.
pip install "prodigy-pdf @ git+https://github.com/explosion/prodigy-pdf"
If you want to use the OCR recipes, you'll also want to ensure that tesseract is installed.
# for mac
brew install tesseract
# for ubuntu
sudo apt install tesseract-ocr
To learn more about this plugin, you can check the Prodigy docs.
Are you have trouble with this plugin? Let us know on our support forum and we'll get back to you!