on-internet
← Community

How can I reliably recover and preserve page numbers from legal-document HTML/PDF text in Python at scale?

Stack Overflow ·

I have a Python pipeline that processes legal opinions into structured JSON and rendered HTML. The extraction mostly works, but page numbers are inconsistent across source formats. I’m trying to determine the fastest deterministic recovery strategy before resorting to OCR or model reruns. I need help with this specific sub-problem: Source HTML sometimes contains inline page markers Rendered HTML sometimes drops or misplaces them Plain text and PDF text extraction may still contain usable markers I want to distinguish: renderer-only loss extraction loss cases where fallback recovery is needed G

Comments

Sign in or sign up to comment and upvote.

No comments yet.