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:
2
klausur-service/backend/ocr/engines/__init__.py
Normal file
2
klausur-service/backend/ocr/engines/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
"""OCR engines sub-package."""
|
||||
from .engines import * # noqa: F401,F403
|
||||
@@ -16,7 +16,7 @@ from typing import Any, Dict, List, Optional
|
||||
|
||||
import numpy as np
|
||||
|
||||
from cv_vocab_types import PageRegion, RowGeometry
|
||||
from ..types import PageRegion, RowGeometry
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -11,14 +11,14 @@ import logging
|
||||
import re
|
||||
from typing import Any, Dict, List
|
||||
|
||||
from cv_vocab_types import IPA_AVAILABLE
|
||||
from ..types import IPA_AVAILABLE
|
||||
|
||||
from cv_ocr_ipa_lookup import (
|
||||
from .ipa_lookup import (
|
||||
_insert_missing_ipa,
|
||||
_replace_phonetics_in_text,
|
||||
_text_has_garbled_ipa,
|
||||
)
|
||||
from cv_ocr_ipa_repair import (
|
||||
from .ipa_repair import (
|
||||
_has_non_dict_trailing,
|
||||
_insert_headword_ipa,
|
||||
_strip_post_bracket_garbled,
|
||||
|
||||
@@ -24,7 +24,7 @@ from typing import Any, Dict, List, Optional, Tuple
|
||||
|
||||
import numpy as np
|
||||
|
||||
from cv_vocab_types import (
|
||||
from ..types import (
|
||||
IPA_AVAILABLE,
|
||||
PageRegion,
|
||||
RowGeometry,
|
||||
@@ -47,7 +47,7 @@ except ImportError:
|
||||
|
||||
# ── Re-exports from sub-modules (backward compatibility) ──────────────────
|
||||
|
||||
from cv_ocr_word_assembly import ( # noqa: F401
|
||||
from .word_assembly import ( # noqa: F401
|
||||
_group_words_into_lines,
|
||||
_words_to_reading_order_lines,
|
||||
_rejoin_hyphenated,
|
||||
@@ -55,7 +55,7 @@ from cv_ocr_word_assembly import ( # noqa: F401
|
||||
_words_to_spaced_text,
|
||||
)
|
||||
|
||||
from cv_ocr_vocab_postprocess import ( # noqa: F401
|
||||
from .vocab_postprocess import ( # noqa: F401
|
||||
_CHAR_CONFUSION_RULES,
|
||||
_DE_INDICATORS_FOR_EN_I,
|
||||
_fix_character_confusion,
|
||||
@@ -66,7 +66,7 @@ from cv_ocr_vocab_postprocess import ( # noqa: F401
|
||||
_attach_example_sentences,
|
||||
)
|
||||
|
||||
from cv_ocr_ipa_lookup import ( # noqa: F401
|
||||
from .ipa_lookup import ( # noqa: F401
|
||||
_PHONETIC_BRACKET_RE,
|
||||
_IPA_CHARS,
|
||||
_MIN_WORD_CONF,
|
||||
@@ -80,20 +80,20 @@ from cv_ocr_ipa_lookup import ( # noqa: F401
|
||||
_insert_missing_ipa,
|
||||
)
|
||||
|
||||
from cv_ocr_ipa_repair import ( # noqa: F401
|
||||
from .ipa_repair import ( # noqa: F401
|
||||
_has_non_dict_trailing,
|
||||
_strip_post_bracket_garbled,
|
||||
fix_ipa_continuation_cell,
|
||||
_insert_headword_ipa,
|
||||
)
|
||||
|
||||
from cv_ocr_cell_phonetics import ( # noqa: F401
|
||||
from .cell_phonetics import ( # noqa: F401
|
||||
fix_cell_phonetics,
|
||||
_has_ipa_gap,
|
||||
_sync_word_boxes_after_ipa_insert,
|
||||
)
|
||||
|
||||
from cv_ocr_cell_filter import ( # noqa: F401
|
||||
from .cell_filter import ( # noqa: F401
|
||||
_RE_REAL_WORD,
|
||||
_RE_ALPHA,
|
||||
_COMMON_SHORT_WORDS,
|
||||
|
||||
@@ -23,7 +23,7 @@ import logging
|
||||
import re
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from cv_vocab_types import (
|
||||
from ..types import (
|
||||
IPA_AVAILABLE,
|
||||
_britfone_dict,
|
||||
_ipa_convert_american,
|
||||
|
||||
@@ -16,8 +16,8 @@ import logging
|
||||
import re
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from cv_vocab_types import IPA_AVAILABLE
|
||||
from cv_ocr_ipa_lookup import (
|
||||
from ..types import IPA_AVAILABLE
|
||||
from .ipa_lookup import (
|
||||
_lookup_ipa,
|
||||
_GRAMMAR_BRACKET_WORDS,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user