Wrapping Docling in a Reusable Text Extraction Pipeline
· 11 min read

Docling already does most of what a batch text-extraction harness needs: it iterates over documents, swaps OCR backends, isolates per-document errors, and exports structured output. For the soviet.recipes project I wrap it in a thin pipeline so I can put different extraction approaches against each other on the same pages and trust the result. Docling does the extraction, but the wrapper prepares the book's curled and shadowed pages first and puts every engine behind one interface, whether it runs through Docling or bypasses it, so routing and scoring stay independent of which tool produced the text.
