Files
ocr_scanner/test
vchuser 8d50334915 Fix part-number and date-code selection in ocr-extract
Part number now picks the longest hyphenated candidate instead of the
first one, matching the documented intent and preventing a short
unrelated token from being reported as the part number (which feeds
the fingerprint used for sorting).

Date code now only accepts YYWW candidates with a plausible year
(10-39) and valid calendar week (01-53), taking the last match when
several qualify; otherwise it stays null instead of guessing wrong,
since a wrong value is worse than a missing one.

Adds regression tests for both cases plus a no-plausible-candidate
case that must yield null.
2026-07-28 14:52:28 +02:00
..