chore(pdf): remove two orphaned region helpers from pdfminer_processing

KR
4h ago
+0-35

Summary

Two functions in unstructured/partition/pdf_image/pdfminer_processing.py have no callers anywhere in the library, tests or scripts:

  • _create_text_region(), which scaled coordinates and built a single text region.
  • pdfminer_elements_to_text_regions(), which converted LayoutElements into a list of EmbeddedTextRegion / ImageTextRegion objects. Its docstring calls it "a temporary solution" until the merging logic was refactored.

Both lost their last callers when layout merging moved to the vectorized TextRegions / LayoutElements structures (#3881, #3900). Coverage over the full test suite confirms neither ever runs.

This PR deletes both. Nothing else in the module changes: Source, LayoutElements and TextRegions are still used elsewhere.

Behavior

Unchanged: the removed code was unreachable.

Validation

  • test_unstructured/partition/pdf_image passes (658 passed, 3 skipped).
  • ruff check / ruff format --check pass.
  • Merges cleanly with #4680 and #4681, which touch the same file.