fix: _MIN_WORD_CONF als Modul-Konstante statt lokale Variable
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 29s
CI / test-go-edu-search (push) Successful in 29s
CI / test-python-klausur (push) Failing after 2m12s
CI / test-python-agent-core (push) Successful in 17s
CI / test-nodejs-website (push) Successful in 20s
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 29s
CI / test-go-edu-search (push) Successful in 29s
CI / test-python-klausur (push) Failing after 2m12s
CI / test-python-agent-core (push) Successful in 17s
CI / test-nodejs-website (push) Successful in 20s
NameError in build_cell_grid_v2 weil _MIN_WORD_CONF nur in _ocr_cell_crop und build_cell_grid lokal definiert war. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -39,6 +39,8 @@ try:
|
||||
except ImportError:
|
||||
Image = None # type: ignore[assignment,misc]
|
||||
|
||||
# Minimum OCR word confidence to keep (used across multiple functions)
|
||||
_MIN_WORD_CONF = 30
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -186,7 +188,6 @@ def _ocr_cell_crop(
|
||||
words = []
|
||||
|
||||
# Filter low-confidence words
|
||||
_MIN_WORD_CONF = 30
|
||||
if words:
|
||||
words = [w for w in words if w.get('conf', 0) >= _MIN_WORD_CONF]
|
||||
|
||||
@@ -652,7 +653,6 @@ def _ocr_single_cell(
|
||||
# Filter low-confidence words (OCR noise from images/artifacts).
|
||||
# Tesseract gives low confidence to misread image edges, borders,
|
||||
# and other non-text elements.
|
||||
_MIN_WORD_CONF = 30
|
||||
if words:
|
||||
words = [w for w in words if w.get('conf', 0) >= _MIN_WORD_CONF]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user