Shared utility functions for extractor geometry and text operations.
geometry.py- bbox center/bounds utilities
- region selection helpers (
top_region_spans,bottom_region_spans)
span_queries.py- anchor search and proximity queries:
- find spans containing keyword
- spans to right / below anchors
- nearest joined text snippets
- anchor search and proximity queries:
text_parsing.py- normalization and parsing helpers:
normalize_textextract_money_from_textextract_date_from_textextract_name_like_text
- normalization and parsing helpers:
Without shared helper modules, extractor logic duplicates geometry and regex code across document types. These helpers keep extractor classes focused on document-specific heuristics.