Product recognition demo for supermarket shelf images
Find a file
tngo ff11529476 fix: cut whole quantity tokens, and gate the fill-in by default
Review 2, item 2. The first version of this gate counted bigrams with a
non-digit character, which let the unit's own letters through: "400g 50%"
left "0G" and "0%", "450g カロリー50%" left "0%", and "500ml" left
"0M". All three still named products.

The quantity token is now cut whole - digits plus unit, in either script -
before counting, and the floor is three bigrams rather than two, because
"カロリ" is two and it is a descriptor every low-calorie package prints.

DecisionPolicy.decide gated the fill-in only when a read was passed, so the
unsafe behaviour was the default. Omitting the read now means no fill-in: a
caller with a ranking and no read has not shown the text can name anything.
TextLane.carries_identity was a dead duplicate of the module function; deleted.

Tests: the five cases from the review plus the default-gate case. Suite 284 ->
286. Evaluator unchanged: local 61%/77% full, 59%/95% live.
2026-09-28 23:46:03 +09:00
.github/workflows chore: run the Python suite from the repository root 2026-09-28 17:26:58 +09:00
recognization fix: cut whole quantity tokens, and gate the fill-in by default 2026-09-28 23:46:03 +09:00
.gitignore Initial commit for push folder 2026-09-18 09:13:53 +09:00