Restructure: Move 47 cv_* files into ocr/ package
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 39s
CI / test-go-edu-search (push) Successful in 29s
CI / test-python-klausur (push) Failing after 2m34s
CI / test-python-agent-core (push) Successful in 20s
CI / test-nodejs-website (push) Successful in 26s
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 39s
CI / test-go-edu-search (push) Successful in 29s
CI / test-python-klausur (push) Failing after 2m34s
CI / test-python-agent-core (push) Successful in 20s
CI / test-nodejs-website (push) Successful in 26s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,14 +21,14 @@ from typing import Any, Dict, List, Optional, Tuple
|
||||
|
||||
import numpy as np
|
||||
|
||||
from cv_vocab_types import ColumnGeometry, DetectedBox, PageRegion
|
||||
from ..types import ColumnGeometry, DetectedBox, PageRegion
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# ── Re-exports (backward compatibility) ───────────────────────────────────
|
||||
|
||||
from cv_layout_detection import ( # noqa: F401
|
||||
from .detection import ( # noqa: F401
|
||||
detect_document_type,
|
||||
create_ocr_image,
|
||||
create_layout_image,
|
||||
@@ -39,46 +39,46 @@ from cv_layout_detection import ( # noqa: F401
|
||||
_add_header_footer,
|
||||
)
|
||||
|
||||
from cv_layout_analyze import ( # noqa: F401
|
||||
from .analyze import ( # noqa: F401
|
||||
analyze_layout,
|
||||
)
|
||||
|
||||
from cv_layout_columns import ( # noqa: F401
|
||||
from .columns import ( # noqa: F401
|
||||
detect_column_geometry,
|
||||
_detect_columns_by_clustering,
|
||||
_build_geometries_from_starts,
|
||||
)
|
||||
|
||||
from cv_layout_column_refine import ( # noqa: F401
|
||||
from .column_refine import ( # noqa: F401
|
||||
_detect_sub_columns,
|
||||
_split_broad_columns,
|
||||
expand_narrow_columns,
|
||||
)
|
||||
|
||||
from cv_layout_rows import ( # noqa: F401
|
||||
from .rows import ( # noqa: F401
|
||||
detect_row_geometry,
|
||||
_build_rows_from_word_grouping,
|
||||
)
|
||||
|
||||
from cv_layout_row_regularize import ( # noqa: F401
|
||||
from .row_regularize import ( # noqa: F401
|
||||
_regularize_row_grid,
|
||||
)
|
||||
|
||||
from cv_layout_scoring import ( # noqa: F401
|
||||
from .scoring import ( # noqa: F401
|
||||
_score_language,
|
||||
_score_role,
|
||||
_score_dictionary_signals,
|
||||
_classify_dictionary_columns,
|
||||
)
|
||||
|
||||
from cv_layout_classify import ( # noqa: F401
|
||||
from .classify import ( # noqa: F401
|
||||
_build_margin_regions,
|
||||
positional_column_regions,
|
||||
classify_column_types,
|
||||
_classify_by_content,
|
||||
)
|
||||
|
||||
from cv_layout_classify_position import ( # noqa: F401
|
||||
from .classify_position import ( # noqa: F401
|
||||
_classify_by_position_enhanced,
|
||||
_classify_by_position_fallback,
|
||||
)
|
||||
@@ -143,7 +143,7 @@ def detect_column_geometry_zoned(
|
||||
per content zone on the corresponding sub-image.
|
||||
4. If no boxes: delegates entirely to detect_column_geometry().
|
||||
"""
|
||||
from cv_box_detect import detect_boxes, split_page_into_zones
|
||||
from ..detect.box_detect import detect_boxes, split_page_into_zones
|
||||
|
||||
geo_result = detect_column_geometry(ocr_img, dewarped_bgr)
|
||||
if geo_result is None:
|
||||
|
||||
Reference in New Issue
Block a user