How to remove OCR line breaks without joining separate records
Decide which line breaks encode structure before replacing them. Wrapped prose, address lines and lists need different treatment.
Take one paragraph that wraps mid-sentence and one numbered list. Join lines inside the paragraph, retain each list entry on its own line, then compare the boundary with the page image. Apply the rule only to blocks with the same layout.
Preserve a raw TXT copy before cleanup. When a hyphen falls at a line break, compare it with the page image to decide whether it belongs to the word or was inserted by line wrapping.