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

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-04-25 21:03:54 +02:00
parent 45287b3541
commit cb1be59e46
95 changed files with 317 additions and 103 deletions

View File

@@ -0,0 +1,2 @@
"""Detection sub-package (boxes, graphics, colors, syllables, doclayout)."""
from .box_detect import * # noqa: F401,F403

View File

@@ -21,7 +21,7 @@ from typing import List, Optional, Tuple
import cv2
import numpy as np
from cv_vocab_types import DetectedBox, PageZone
from ..types import DetectedBox, PageZone
logger = logging.getLogger(__name__)

View File

@@ -127,7 +127,7 @@ def detect_graphic_elements(
backend = os.environ.get("GRAPHIC_DETECT_BACKEND", "auto")
if backend in ("doclayout", "auto"):
try:
from cv_doclayout_detect import detect_layout_regions, is_doclayout_available
from .doclayout_detect import detect_layout_regions, is_doclayout_available
if is_doclayout_available():
regions = detect_layout_regions(img_bgr)
if regions:

View File

@@ -0,0 +1,2 @@
"""Syllable detection sub-package."""
from .detect import * # noqa: F401,F403

View File

@@ -10,7 +10,7 @@ DATENSCHUTZ: Alle Verarbeitung erfolgt lokal.
"""
# Core: init, validation, autocorrect
from cv_syllable_core import ( # noqa: F401
from .core import ( # noqa: F401
_IPA_RE,
_STOP_WORDS,
_get_hyphenators,
@@ -23,7 +23,7 @@ from cv_syllable_core import ( # noqa: F401
)
# Merge: gap merging, syllabify, insert
from cv_syllable_merge import ( # noqa: F401
from .merge import ( # noqa: F401
_try_merge_pipe_gaps,
merge_word_gaps_in_zones,
_try_merge_word_gaps,

View File

@@ -13,7 +13,7 @@ from typing import Any, Dict, List, Optional
import numpy as np
from cv_syllable_core import (
from .core import (
_get_hyphenators,
_hyphenate_word,
_IPA_RE,