"""
Multi-pass OCR, line matching, LLM/spell review, and pipeline orchestration.

Re-export facade -- all logic lives in the sub-modules:

  cv_review_pipeline   Stages 6-8: OCR, line alignment, orchestrator
  cv_review_spell      Rule-based spell-checker OCR correction
  cv_review_llm        LLM-based OCR correction, prompt building, streaming

Lizenz: Apache 2.0 (kommerziell nutzbar)
DATENSCHUTZ: Alle Verarbeitung erfolgt lokal.
"""

# Re-export everything for backward compatibility
from .pipeline import (  # noqa: F401
    ocr_region,
    run_multi_pass_ocr,
    match_lines_to_vocab,
    llm_post_correct,
    run_cv_pipeline,
)

from .spell import (  # noqa: F401
    _SPELL_AVAILABLE,
    _spell_dict_knows,
    _spell_fix_field,
    _spell_fix_token,
    _try_split_merged_word,
    _normalize_page_ref,
    spell_review_entries_sync,
    spell_review_entries_streaming,
)

from .llm import (  # noqa: F401
    OLLAMA_REVIEW_MODEL,
    REVIEW_ENGINE,
    _REVIEW_BATCH_SIZE,
    _build_llm_prompt,
    _diff_batch,
    _entry_needs_review,
    _is_spurious_change,
    _parse_llm_json_array,
    _sanitize_for_json,
    llm_review_entries,
    llm_review_entries_streaming,
)
