{"abstract":"Decimal quantities like 2.5 or 1,5 are split from their units.","category":"Typography line breaking","checks":8,"contract":"Input [words, width]. A single-letter preposition/conjunction (a i o u v z k s w, any case) is bound to the following word, chaining; a number (digits with optional . or , decimal) is bound to a following unit (kg km cm mm % pt px). Bound groups are unbreakable; greedy fill of groups with unit spaces; an overwide group is set alone. Return lines.","evaluation_group":"w2-typography-line-breaking-nonbreaking-bindings","failed_approach":"Stripping only the period still misses decimal commas.","family":"w2-typography-line-breaking-nonbreaking-bindings-decimal-number-detection","id":"FA-80281","implementations":{"attempt":{"sha256":"cdffb3460e92cae44d61454546fc3c11a00aa29904f81dccee2277b5064448ea","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    words, width = x\n    SINGLE = {'a', 'i', 'o', 'u', 'v', 'z', 'k', 's', 'w'}\n    UNITS = {'kg', 'km', 'cm', 'mm', '%', 'pt', 'px'}\n    groups = []\n    k = 0\n    while k < len(words):\n        grp = [words[k]]\n        while True:\n            last = grp[-1]\n            nxt = k + len(grp)\n            if nxt >= len(words):\n                break\n            number = last.replace('.', '').isdigit()\n            if last.lower() in SINGLE or (number and words[nxt] in UNITS):\n                grp.append(words[nxt])\n            else:\n                break\n        groups.append(' '.join(grp))\n        k += len(grp)\n    lines, cur = [], ''\n    for g in groups:\n        cand = g if not cur else cur + ' ' + g\n        if len(cand) <= width or not cur:\n            cur = cand\n        else:\n            lines.append(cur)\n            cur = g\n    if cur:\n        lines.append(cur)\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('regression: decimal number detection', [['text', 's', 'sazba', 'i', 'i', 'text', 'pt', '1,5', 'km', 'domě', 'i'], 16], ['text s sazba', 'i i text pt', '1,5 km domě i']), ('regression: decimal number detection', [['z', 'text', 'domě', '1,5', 'kg', 'cm', 'cm', '10', 'o', 'kg', 'pt'], 16], ['z text domě', '1,5 kg cm cm 10', 'o kg pt']), ('regression: decimal number detection', [['v', 'Praze', 'Praze', 'v', '1,5', 'cm', 'k', 'V', '10'], 12], ['v Praze', 'Praze', 'v 1,5 cm', 'k V 10']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('control layout', [['kg', 'km', 's', '2.5', 'z', 'i', 'pt'], 6], ['kg km', 's 2.5', 'z i pt']), ('control layout', [['a', 'a', 's', 'V', 'sazba', 'z'], 8], ['a a s V sazba', 'z'])], [('regression: decimal number detection', [['z', 'domě', 's', 'V', 's', 's', 's', 'k', '2.5', 'cm', '10', 'k'], 8], ['z domě', 's V s s s k 2.5 cm', '10 k']), ('regression: decimal number detection', [['o', 'i', 'k', 'V', 'text', 'kg', '2.5', 'kg', 'cm'], 7], ['o i k V text', 'kg', '2.5 kg', 'cm']), ('regression: decimal number detection', [['pt', 'cm', 'z', 'km', 'domě', '1,5', 'km', 'pt', 'v', 'v', '1,5', 'z'], 10], ['pt cm z km', 'domě', '1,5 km pt', 'v v 1,5 z']), ('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('control layout', [['sazba', 'V', '1,5', 's', 'z'], 8], ['sazba', 'V 1,5', 's z']), ('control layout', [['řádek', 'pt', 'v', 's', 'V', 'pt', 'v'], 14], ['řádek pt', 'v s V pt v'])], [('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('regression: decimal number detection', [['text', '1,5', 'V', 'k', 'sazba', '1,5', 'km', 'text', 'i'], 15], ['text 1,5', 'V k sazba', '1,5 km text i']), ('regression: decimal number detection', [['text', 's', 'sazba', 'i', 'i', 'text', 'pt', '1,5', 'km', 'domě', 'i'], 16], ['text s sazba', 'i i text pt', '1,5 km domě i']), ('regression: decimal number detection', [['v', 'Praze', 'Praze', 'v', '1,5', 'cm', 'k', 'V', '10'], 12], ['v Praze', 'Praze', 'v 1,5 cm', 'k V 10']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('control layout', [['V', 'V', 'Praze', 'řádek', '2.5', 'domě'], 13], ['V V Praze', 'řádek 2.5', 'domě']), ('control layout', [['s', 'text', 'a', 'text', 'sazba', '10', 'v', 'text', '10', '10'], 6], ['s text', 'a text', 'sazba', '10', 'v text', '10 10'])], [('regression: decimal number detection', [['text', '1,5', 'V', 'k', 'sazba', '1,5', 'km', 'text', 'i'], 15], ['text 1,5', 'V k sazba', '1,5 km text i']), ('regression: decimal number detection', [['i', '2.5', 'pt', 'o', '1,5', 'o', 'i', 'V', 'pt', 'text', '2.5', 'km'], 7], ['i 2.5 pt', 'o 1,5', 'o i V pt', 'text', '2.5 km']), ('regression: decimal number detection', [['pt', 'cm', 'z', 'km', 'domě', '1,5', 'km', 'pt', 'v', 'v', '1,5', 'z'], 10], ['pt cm z km', 'domě', '1,5 km pt', 'v v 1,5 z']), ('regression: decimal number detection', [['text', 's', 'sazba', 'i', 'i', 'text', 'pt', '1,5', 'km', 'domě', 'i'], 16], ['text s sazba', 'i i text pt', '1,5 km domě i']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('control layout', [['v', 's', 'k', 'domě', 'k', 'k'], 6], ['v s k domě', 'k k']), ('control layout', [['s', 'text', 'a', 'text', 'sazba', '10', 'v', 'text', '10', '10'], 6], ['s text', 'a text', 'sazba', '10', 'v text', '10 10'])], [('regression: decimal number detection', [['o', 'i', 'k', 'V', 'text', 'kg', '2.5', 'kg', 'cm'], 7], ['o i k V text', 'kg', '2.5 kg', 'cm']), ('regression: decimal number detection', [['o', 'a', 's', 's', '1,5', 'cm', 'pt'], 7], ['o a s s 1,5 cm', 'pt']), ('regression: decimal number detection', [['text', 's', 'sazba', 'i', 'i', 'text', 'pt', '1,5', 'km', 'domě', 'i'], 16], ['text s sazba', 'i i text pt', '1,5 km domě i']), ('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('control layout', [['V', '1,5', 'pt', '1,5', 'z', 'o', 'i'], 11], ['V 1,5 pt', '1,5 z o i']), ('control layout', [['1,5', 'km', 'domě', 'sazba', 'kg', 'V', 'v', 'text', 'domě', '1,5'], 11], ['1,5 km domě', 'sazba kg', 'V v text', 'domě 1,5'])]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"5948001fa100f971ba0b13ba0c281c9b74206c831573a60a280b0755ab26c60a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    words, width = x\n    SINGLE = {'a', 'i', 'o', 'u', 'v', 'z', 'k', 's', 'w'}\n    UNITS = {'kg', 'km', 'cm', 'mm', '%', 'pt', 'px'}\n    groups = []\n    k = 0\n    while k < len(words):\n        grp = [words[k]]\n        while True:\n            last = grp[-1]\n            nxt = k + len(grp)\n            if nxt >= len(words):\n                break\n            number = last.isdigit()\n            if last.lower() in SINGLE or (number and words[nxt] in UNITS):\n                grp.append(words[nxt])\n            else:\n                break\n        groups.append(' '.join(grp))\n        k += len(grp)\n    lines, cur = [], ''\n    for g in groups:\n        cand = g if not cur else cur + ' ' + g\n        if len(cand) <= width or not cur:\n            cur = cand\n        else:\n            lines.append(cur)\n            cur = g\n    if cur:\n        lines.append(cur)\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('regression: decimal number detection', [['text', 's', 'sazba', 'i', 'i', 'text', 'pt', '1,5', 'km', 'domě', 'i'], 16], ['text s sazba', 'i i text pt', '1,5 km domě i']), ('regression: decimal number detection', [['z', 'text', 'domě', '1,5', 'kg', 'cm', 'cm', '10', 'o', 'kg', 'pt'], 16], ['z text domě', '1,5 kg cm cm 10', 'o kg pt']), ('regression: decimal number detection', [['v', 'Praze', 'Praze', 'v', '1,5', 'cm', 'k', 'V', '10'], 12], ['v Praze', 'Praze', 'v 1,5 cm', 'k V 10']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('control layout', [['kg', 'km', 's', '2.5', 'z', 'i', 'pt'], 6], ['kg km', 's 2.5', 'z i pt']), ('control layout', [['a', 'a', 's', 'V', 'sazba', 'z'], 8], ['a a s V sazba', 'z'])], [('regression: decimal number detection', [['z', 'domě', 's', 'V', 's', 's', 's', 'k', '2.5', 'cm', '10', 'k'], 8], ['z domě', 's V s s s k 2.5 cm', '10 k']), ('regression: decimal number detection', [['o', 'i', 'k', 'V', 'text', 'kg', '2.5', 'kg', 'cm'], 7], ['o i k V text', 'kg', '2.5 kg', 'cm']), ('regression: decimal number detection', [['pt', 'cm', 'z', 'km', 'domě', '1,5', 'km', 'pt', 'v', 'v', '1,5', 'z'], 10], ['pt cm z km', 'domě', '1,5 km pt', 'v v 1,5 z']), ('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('control layout', [['sazba', 'V', '1,5', 's', 'z'], 8], ['sazba', 'V 1,5', 's z']), ('control layout', [['řádek', 'pt', 'v', 's', 'V', 'pt', 'v'], 14], ['řádek pt', 'v s V pt v'])], [('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('regression: decimal number detection', [['text', '1,5', 'V', 'k', 'sazba', '1,5', 'km', 'text', 'i'], 15], ['text 1,5', 'V k sazba', '1,5 km text i']), ('regression: decimal number detection', [['text', 's', 'sazba', 'i', 'i', 'text', 'pt', '1,5', 'km', 'domě', 'i'], 16], ['text s sazba', 'i i text pt', '1,5 km domě i']), ('regression: decimal number detection', [['v', 'Praze', 'Praze', 'v', '1,5', 'cm', 'k', 'V', '10'], 12], ['v Praze', 'Praze', 'v 1,5 cm', 'k V 10']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('control layout', [['V', 'V', 'Praze', 'řádek', '2.5', 'domě'], 13], ['V V Praze', 'řádek 2.5', 'domě']), ('control layout', [['s', 'text', 'a', 'text', 'sazba', '10', 'v', 'text', '10', '10'], 6], ['s text', 'a text', 'sazba', '10', 'v text', '10 10'])], [('regression: decimal number detection', [['text', '1,5', 'V', 'k', 'sazba', '1,5', 'km', 'text', 'i'], 15], ['text 1,5', 'V k sazba', '1,5 km text i']), ('regression: decimal number detection', [['i', '2.5', 'pt', 'o', '1,5', 'o', 'i', 'V', 'pt', 'text', '2.5', 'km'], 7], ['i 2.5 pt', 'o 1,5', 'o i V pt', 'text', '2.5 km']), ('regression: decimal number detection', [['pt', 'cm', 'z', 'km', 'domě', '1,5', 'km', 'pt', 'v', 'v', '1,5', 'z'], 10], ['pt cm z km', 'domě', '1,5 km pt', 'v v 1,5 z']), ('regression: decimal number detection', [['text', 's', 'sazba', 'i', 'i', 'text', 'pt', '1,5', 'km', 'domě', 'i'], 16], ['text s sazba', 'i i text pt', '1,5 km domě i']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('control layout', [['v', 's', 'k', 'domě', 'k', 'k'], 6], ['v s k domě', 'k k']), ('control layout', [['s', 'text', 'a', 'text', 'sazba', '10', 'v', 'text', '10', '10'], 6], ['s text', 'a text', 'sazba', '10', 'v text', '10 10'])], [('regression: decimal number detection', [['o', 'i', 'k', 'V', 'text', 'kg', '2.5', 'kg', 'cm'], 7], ['o i k V text', 'kg', '2.5 kg', 'cm']), ('regression: decimal number detection', [['o', 'a', 's', 's', '1,5', 'cm', 'pt'], 7], ['o a s s 1,5 cm', 'pt']), ('regression: decimal number detection', [['text', 's', 'sazba', 'i', 'i', 'text', 'pt', '1,5', 'km', 'domě', 'i'], 16], ['text s sazba', 'i i text pt', '1,5 km domě i']), ('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('control layout', [['V', '1,5', 'pt', '1,5', 'z', 'o', 'i'], 11], ['V 1,5 pt', '1,5 z o i']), ('control layout', [['1,5', 'km', 'domě', 'sazba', 'kg', 'V', 'v', 'text', 'domě', '1,5'], 11], ['1,5 km domě', 'sazba kg', 'V v text', 'domě 1,5'])]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"70b062463261e2ffdc64b7a1424f4d060f8afa96f020a38de52cadd668c0f70d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    words, width = x\n    SINGLE = {'a', 'i', 'o', 'u', 'v', 'z', 'k', 's', 'w'}\n    UNITS = {'kg', 'km', 'cm', 'mm', '%', 'pt', 'px'}\n    groups = []\n    k = 0\n    while k < len(words):\n        grp = [words[k]]\n        while True:\n            last = grp[-1]\n            nxt = k + len(grp)\n            if nxt >= len(words):\n                break\n            number = last.replace('.', '').replace(',', '').isdigit()\n            if last.lower() in SINGLE or (number and words[nxt] in UNITS):\n                grp.append(words[nxt])\n            else:\n                break\n        groups.append(' '.join(grp))\n        k += len(grp)\n    lines, cur = [], ''\n    for g in groups:\n        cand = g if not cur else cur + ' ' + g\n        if len(cand) <= width or not cur:\n            cur = cand\n        else:\n            lines.append(cur)\n            cur = g\n    if cur:\n        lines.append(cur)\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('regression: decimal number detection', [['text', 's', 'sazba', 'i', 'i', 'text', 'pt', '1,5', 'km', 'domě', 'i'], 16], ['text s sazba', 'i i text pt', '1,5 km domě i']), ('regression: decimal number detection', [['z', 'text', 'domě', '1,5', 'kg', 'cm', 'cm', '10', 'o', 'kg', 'pt'], 16], ['z text domě', '1,5 kg cm cm 10', 'o kg pt']), ('regression: decimal number detection', [['v', 'Praze', 'Praze', 'v', '1,5', 'cm', 'k', 'V', '10'], 12], ['v Praze', 'Praze', 'v 1,5 cm', 'k V 10']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('control layout', [['kg', 'km', 's', '2.5', 'z', 'i', 'pt'], 6], ['kg km', 's 2.5', 'z i pt']), ('control layout', [['a', 'a', 's', 'V', 'sazba', 'z'], 8], ['a a s V sazba', 'z'])], [('regression: decimal number detection', [['z', 'domě', 's', 'V', 's', 's', 's', 'k', '2.5', 'cm', '10', 'k'], 8], ['z domě', 's V s s s k 2.5 cm', '10 k']), ('regression: decimal number detection', [['o', 'i', 'k', 'V', 'text', 'kg', '2.5', 'kg', 'cm'], 7], ['o i k V text', 'kg', '2.5 kg', 'cm']), ('regression: decimal number detection', [['pt', 'cm', 'z', 'km', 'domě', '1,5', 'km', 'pt', 'v', 'v', '1,5', 'z'], 10], ['pt cm z km', 'domě', '1,5 km pt', 'v v 1,5 z']), ('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('control layout', [['sazba', 'V', '1,5', 's', 'z'], 8], ['sazba', 'V 1,5', 's z']), ('control layout', [['řádek', 'pt', 'v', 's', 'V', 'pt', 'v'], 14], ['řádek pt', 'v s V pt v'])], [('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('regression: decimal number detection', [['text', '1,5', 'V', 'k', 'sazba', '1,5', 'km', 'text', 'i'], 15], ['text 1,5', 'V k sazba', '1,5 km text i']), ('regression: decimal number detection', [['text', 's', 'sazba', 'i', 'i', 'text', 'pt', '1,5', 'km', 'domě', 'i'], 16], ['text s sazba', 'i i text pt', '1,5 km domě i']), ('regression: decimal number detection', [['v', 'Praze', 'Praze', 'v', '1,5', 'cm', 'k', 'V', '10'], 12], ['v Praze', 'Praze', 'v 1,5 cm', 'k V 10']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('control layout', [['V', 'V', 'Praze', 'řádek', '2.5', 'domě'], 13], ['V V Praze', 'řádek 2.5', 'domě']), ('control layout', [['s', 'text', 'a', 'text', 'sazba', '10', 'v', 'text', '10', '10'], 6], ['s text', 'a text', 'sazba', '10', 'v text', '10 10'])], [('regression: decimal number detection', [['text', '1,5', 'V', 'k', 'sazba', '1,5', 'km', 'text', 'i'], 15], ['text 1,5', 'V k sazba', '1,5 km text i']), ('regression: decimal number detection', [['i', '2.5', 'pt', 'o', '1,5', 'o', 'i', 'V', 'pt', 'text', '2.5', 'km'], 7], ['i 2.5 pt', 'o 1,5', 'o i V pt', 'text', '2.5 km']), ('regression: decimal number detection', [['pt', 'cm', 'z', 'km', 'domě', '1,5', 'km', 'pt', 'v', 'v', '1,5', 'z'], 10], ['pt cm z km', 'domě', '1,5 km pt', 'v v 1,5 z']), ('regression: decimal number detection', [['text', 's', 'sazba', 'i', 'i', 'text', 'pt', '1,5', 'km', 'domě', 'i'], 16], ['text s sazba', 'i i text pt', '1,5 km domě i']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('control layout', [['v', 's', 'k', 'domě', 'k', 'k'], 6], ['v s k domě', 'k k']), ('control layout', [['s', 'text', 'a', 'text', 'sazba', '10', 'v', 'text', '10', '10'], 6], ['s text', 'a text', 'sazba', '10', 'v text', '10 10'])], [('regression: decimal number detection', [['o', 'i', 'k', 'V', 'text', 'kg', '2.5', 'kg', 'cm'], 7], ['o i k V text', 'kg', '2.5 kg', 'cm']), ('regression: decimal number detection', [['o', 'a', 's', 's', '1,5', 'cm', 'pt'], 7], ['o a s s 1,5 cm', 'pt']), ('regression: decimal number detection', [['text', 's', 'sazba', 'i', 'i', 'text', 'pt', '1,5', 'km', 'domě', 'i'], 16], ['text s sazba', 'i i text pt', '1,5 km domě i']), ('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('control layout', [['V', '1,5', 'pt', '1,5', 'z', 'o', 'i'], 11], ['V 1,5 pt', '1,5 z o i']), ('control layout', [['1,5', 'km', 'domě', 'sazba', 'kg', 'V', 'v', 'text', 'domě', '1,5'], 11], ['1,5 km domě', 'sazba kg', 'V v text', 'domě 1,5'])]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"A deterministic toy typesetting model with integer widths and a stipulated rule set; it does not claim conformance to any engine. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-typography-line-breaking-nonbreaking-bindings-decimal-number-detection","generated_at":"2026-09-29T14:49:52.291134+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Line breaking decides where paragraphs wrap on screen and in print; a wrong decision point shifts every following line.","repair":"Strip one decimal separator before testing for digits.","root_cause":"Only pure digit strings are recognised as numbers.","sha256":"84c56497a7ce2612c30bb545ff15b1ddeacf3da0a153add39cdf97c3e801609e","title":"Single-letter and unit bindings: decimal number detection · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.426,"exit_code":1,"observations":[{"actual":["sazba 1,5","cm text"],"check":"decimal comma with unit","expected":["sazba","1,5 cm","text"],"passed":false},{"actual":["text s sazba","i i text pt 1,5","km domě i"],"check":"regression: decimal number detection","expected":["text s sazba","i i text pt","1,5 km domě i"],"passed":false},{"actual":["z text domě 1,5","kg cm cm 10 o kg","pt"],"check":"regression: decimal number detection","expected":["z text domě","1,5 kg cm cm 10","o kg pt"],"passed":false},{"actual":["v Praze","Praze v 1,5","cm k V 10"],"check":"regression: decimal number detection","expected":["v Praze","Praze","v 1,5 cm","k V 10"],"passed":false},{"actual":["text","v a k domě"],"check":"chained singles","expected":["text","v a k domě"],"passed":true},{"actual":["V Praze","text","sazba"],"check":"sentence-initial V binds","expected":["V Praze","text","sazba"],"passed":true},{"actual":["kg km","s 2.5","z i pt"],"check":"control layout","expected":["kg km","s 2.5","z i pt"],"passed":true},{"actual":["a a s V sazba","z"],"check":"control layout","expected":["a a s V sazba","z"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"decimal comma with unit\", \"actual\": [\"sazba 1,5\", \"cm text\"], \"expected\": [\"sazba\", \"1,5 cm\", \"text\"], \"passed\": false}, {\"check\": \"regression: decimal number detection\", \"actual\": [\"text s sazba\", \"i i text pt 1,5\", \"km domě i\"], \"expected\": [\"text s sazba\", \"i i text pt\", \"1,5 km domě i\"], \"passed\": false}, {\"check\": \"regression: decimal number detection\", \"actual\": [\"z text domě 1,5\", \"kg cm cm 10 o kg\", \"pt\"], \"expected\": [\"z text domě\", \"1,5 kg cm cm 10\", \"o kg pt\"], \"passed\": false}, {\"check\": \"regression: decimal number detection\", \"actual\": [\"v Praze\", \"Praze v 1,5\", \"cm k V 10\"], \"expected\": [\"v Praze\", \"Praze\", \"v 1,5 cm\", \"k V 10\"], \"passed\": false}, {\"check\": \"chained singles\", \"actual\": [\"text\", \"v a k domě\"], \"expected\": [\"text\", \"v a k domě\"], \"passed\": true}, {\"check\": \"sentence-initial V binds\", \"actual\": [\"V Praze\", \"text\", \"sazba\"], \"expected\": [\"V Praze\", \"text\", \"sazba\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"kg km\", \"s 2.5\", \"z i pt\"], \"expected\": [\"kg km\", \"s 2.5\", \"z i pt\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"a a s V sazba\", \"z\"], \"expected\": [\"a a s V sazba\", \"z\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.567,"exit_code":1,"observations":[{"actual":["sazba 1,5","cm text"],"check":"decimal comma with unit","expected":["sazba","1,5 cm","text"],"passed":false},{"actual":["text s sazba","i i text pt 1,5","km domě i"],"check":"regression: decimal number detection","expected":["text s sazba","i i text pt","1,5 km domě i"],"passed":false},{"actual":["z text domě 1,5","kg cm cm 10 o kg","pt"],"check":"regression: decimal number detection","expected":["z text domě","1,5 kg cm cm 10","o kg pt"],"passed":false},{"actual":["v Praze","Praze v 1,5","cm k V 10"],"check":"regression: decimal number detection","expected":["v Praze","Praze","v 1,5 cm","k V 10"],"passed":false},{"actual":["text","v a k domě"],"check":"chained singles","expected":["text","v a k domě"],"passed":true},{"actual":["V Praze","text","sazba"],"check":"sentence-initial V binds","expected":["V Praze","text","sazba"],"passed":true},{"actual":["kg km","s 2.5","z i pt"],"check":"control layout","expected":["kg km","s 2.5","z i pt"],"passed":true},{"actual":["a a s V sazba","z"],"check":"control layout","expected":["a a s V sazba","z"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"decimal comma with unit\", \"actual\": [\"sazba 1,5\", \"cm text\"], \"expected\": [\"sazba\", \"1,5 cm\", \"text\"], \"passed\": false}, {\"check\": \"regression: decimal number detection\", \"actual\": [\"text s sazba\", \"i i text pt 1,5\", \"km domě i\"], \"expected\": [\"text s sazba\", \"i i text pt\", \"1,5 km domě i\"], \"passed\": false}, {\"check\": \"regression: decimal number detection\", \"actual\": [\"z text domě 1,5\", \"kg cm cm 10 o kg\", \"pt\"], \"expected\": [\"z text domě\", \"1,5 kg cm cm 10\", \"o kg pt\"], \"passed\": false}, {\"check\": \"regression: decimal number detection\", \"actual\": [\"v Praze\", \"Praze v 1,5\", \"cm k V 10\"], \"expected\": [\"v Praze\", \"Praze\", \"v 1,5 cm\", \"k V 10\"], \"passed\": false}, {\"check\": \"chained singles\", \"actual\": [\"text\", \"v a k domě\"], \"expected\": [\"text\", \"v a k domě\"], \"passed\": true}, {\"check\": \"sentence-initial V binds\", \"actual\": [\"V Praze\", \"text\", \"sazba\"], \"expected\": [\"V Praze\", \"text\", \"sazba\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"kg km\", \"s 2.5\", \"z i pt\"], \"expected\": [\"kg km\", \"s 2.5\", \"z i pt\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"a a s V sazba\", \"z\"], \"expected\": [\"a a s V sazba\", \"z\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.811,"exit_code":0,"observations":[{"actual":["sazba","1,5 cm","text"],"check":"decimal comma with unit","expected":["sazba","1,5 cm","text"],"passed":true},{"actual":["text s sazba","i i text pt","1,5 km domě i"],"check":"regression: decimal number detection","expected":["text s sazba","i i text pt","1,5 km domě i"],"passed":true},{"actual":["z text domě","1,5 kg cm cm 10","o kg pt"],"check":"regression: decimal number detection","expected":["z text domě","1,5 kg cm cm 10","o kg pt"],"passed":true},{"actual":["v Praze","Praze","v 1,5 cm","k V 10"],"check":"regression: decimal number detection","expected":["v Praze","Praze","v 1,5 cm","k V 10"],"passed":true},{"actual":["text","v a k domě"],"check":"chained singles","expected":["text","v a k domě"],"passed":true},{"actual":["V Praze","text","sazba"],"check":"sentence-initial V binds","expected":["V Praze","text","sazba"],"passed":true},{"actual":["kg km","s 2.5","z i pt"],"check":"control layout","expected":["kg km","s 2.5","z i pt"],"passed":true},{"actual":["a a s V sazba","z"],"check":"control layout","expected":["a a s V sazba","z"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"decimal comma with unit\", \"actual\": [\"sazba\", \"1,5 cm\", \"text\"], \"expected\": [\"sazba\", \"1,5 cm\", \"text\"], \"passed\": true}, {\"check\": \"regression: decimal number detection\", \"actual\": [\"text s sazba\", \"i i text pt\", \"1,5 km domě i\"], \"expected\": [\"text s sazba\", \"i i text pt\", \"1,5 km domě i\"], \"passed\": true}, {\"check\": \"regression: decimal number detection\", \"actual\": [\"z text domě\", \"1,5 kg cm cm 10\", \"o kg pt\"], \"expected\": [\"z text domě\", \"1,5 kg cm cm 10\", \"o kg pt\"], \"passed\": true}, {\"check\": \"regression: decimal number detection\", \"actual\": [\"v Praze\", \"Praze\", \"v 1,5 cm\", \"k V 10\"], \"expected\": [\"v Praze\", \"Praze\", \"v 1,5 cm\", \"k V 10\"], \"passed\": true}, {\"check\": \"chained singles\", \"actual\": [\"text\", \"v a k domě\"], \"expected\": [\"text\", \"v a k domě\"], \"passed\": true}, {\"check\": \"sentence-initial V binds\", \"actual\": [\"V Praze\", \"text\", \"sazba\"], \"expected\": [\"V Praze\", \"text\", \"sazba\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"kg km\", \"s 2.5\", \"z i pt\"], \"expected\": [\"kg km\", \"s 2.5\", \"z i pt\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"a a s V sazba\", \"z\"], \"expected\": [\"a a s V sazba\", \"z\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}