Three of round 9's four measured holes, each closed with a rule chosen on a measurement rather than named as a limit. `rtf` GIVES 0 SEGMENTS -> 6 of 6 AUTHORED TITLES over N = 4. The container has no heading style, so the author's title is bold text. The grammar is markdown, not `rtf`: the converter already writes that title as `**...**` in the same output every office row produces, so no `rtf`-only heading form exists. Three parameters were swept over 47 readable documents and ONE carried -- refusing a line that ends in terminal punctuation takes false-positive lines from 9-12 to 1-2. A maximum title length (unlimited/40/60/80/120) and a must-stand-between-blank-lines clause are both FLAT, so neither is in the rule. The last false positive is closed by G1, the principle `_gate_outline` already carries: recovery yields to declaration. False positives are then 0 of the 31 declaring documents by construction, and 0 of 27 on the corpus. Reach: 2 of 39 corpus documents, both `docx`, 0 of 33 `pdf` and 0 of 2 `xlsx`. Behind `--bold-title`, default OFF pending the hit@8 measurement; the default bundle is byte-identical without it. BOTH ALTERNATIVES THE ORDER NAMED WERE MEASURED AND FELLED. A fourth hand-laid fixture DECLARES heading styles in a stylesheet and the converter discards them, emitting the same bold line -- so "read the declared headings out of the markdown" has nothing to read. `rtf` -> `docx` -> markdown yields 0 ATX headings on that same document, because the loss is in the `rtf` READER before any writer sees the style. Fixtures are hand-laid in `make_k2_office.py` with the fasit written first; they live in their own directory because Door B walks a drop directory recursively and `k2-office/` reads its N off the listing. THE PREFIX OVER-MATCH: THREE CANDIDATES MEASURED, ALL THREE FAILED ON ONE ROW. Re-measured on the pinned 453-concept bundle with the control run first: `under` occurs 79 times by equality and matches 172 by prefix, `undersjoisk` 0 and 172, `bilateral` 0 and 400 of 453, `standhaftig` 0 and 219. The two extra known-negatives were FOUND, not chosen -- every 4-character prefix ranked by document frequency, then a real word taken from the widest. A longer floor (5-8), a coverage share (0.5-0.8) and a long-words-only floor (>= 8) each cost row 1 its rank on the default bundle and the whole row on Arm B. Decomposed: row 1's token `prisene` reaches its gold document through `pris|sammenstilling` on four characters -- 0.57 of one word and 0.22 of the other -- so the over-match and the wanted match are one mechanism. THE FOURTH CANDIDATE IS THE ANSWER: the shared prefix must be a WORD the bundle uses. `pris` is; `bila` and `stan` are not. `bilateral` 400 -> 0 and 512 -> 0, `standhaftig` 219 -> 56 and 235 -> 33, every hit@8 row keeping rank 1 on BOTH bundles. `undersjoisk` stops at 162 because `under` IS a word here -- a genuine Norwegian morpheme, so that residual is a different answer, not a ceiling. ON by default (`--no-stem-prefix`), pinned with its own known-negative on the shipped bytes. THE SHIM: a path importer holds the object `module_from_spec` made, and `sys.modules[__name__] = _impl` never reaches it. Measured under both counting methods -- 3 of 76 public names by `vars()`. One line copies the public names into this file's globals; the dunder filter is load-bearing, because an unfiltered copy overwrites `__name__` before the next line uses it as the alias key. It restores attribute ACCESS and not patch-through, which is why the alias stays. A CHANGELOG note under 0.7.0 and a shim docstring line say so, since what the consumer asked for was the note. Suite 1515 -> 1535. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
101 lines
3.8 KiB
JSON
101 lines
3.8 KiB
JSON
{
|
|
"_note": [
|
|
"Hand-counted from the AUTHORED content in make_k2_office.py, never from a",
|
|
"converter's output: a fasit read off one converter would score that",
|
|
"converter on its own homework. Committed before the measurement in",
|
|
"docs/2026-09-07-k2-pptx-odt-rtf-fixtures.md was run.",
|
|
"The three documents carry the SAME content in three containers, so the",
|
|
"counts are shared and the container is the only variable."
|
|
],
|
|
"counted_by": "hand, from tests/fixtures/make_k2_office.py",
|
|
"counted_at": "2026-09-07",
|
|
"shared": {
|
|
"cells": 56,
|
|
"pairs": 20,
|
|
"strings": 59
|
|
},
|
|
"how_counted": {
|
|
"cells": "20 rows x 2 columns (PAIRS) + 4 rows x 4 columns (GRID) = 40 + 16",
|
|
"pairs": "the 20 PAIRS rows; every label ends in a colon, which is the rule label_value_rows selects on",
|
|
"strings": "TITLE + INTRO + GRID_CAPTION + 56 cells = 59, all distinct after normalisation and all at or above MIN_STRING"
|
|
},
|
|
"documents": {
|
|
"krav-presentasjon.pptx": {
|
|
"cells": 56,
|
|
"pairs": 20,
|
|
"strings": 59,
|
|
"container": "two slides: title, intro and the 20-row table on slide 1; caption and the 4x4 grid on slide 2"
|
|
},
|
|
"krav-tekstdokument.odt": {
|
|
"cells": 56,
|
|
"pairs": 20,
|
|
"strings": 59,
|
|
"container": "one text body: heading, intro paragraph, 20-row table, caption paragraph, 4x4 table"
|
|
},
|
|
"krav-rikt-tekstformat.rtf": {
|
|
"cells": 56,
|
|
"pairs": 20,
|
|
"strings": 59,
|
|
"container": "flat stream: title paragraph, intro paragraph, 20 table rows, caption paragraph, 4 table rows"
|
|
}
|
|
},
|
|
"rtf_variants": {
|
|
"_note": [
|
|
"Hand-counted 2026-09-09 from the AUTHORED content in",
|
|
"make_k2_office.py, BEFORE round 10's bold-title rule was measured",
|
|
"against it -- never from a converter's output. `authored_titles` is",
|
|
"what a reader of the source would call a section name; it is NOT a",
|
|
"count of what any container manages to declare, which is the whole",
|
|
"point: rtf has no heading style, so the author's title is bold text.",
|
|
"`bold_runs_that_are_not_titles` is the known-negative denominator."
|
|
],
|
|
"counted_by": "hand, from tests/fixtures/make_k2_office.py",
|
|
"counted_at": "2026-09-09",
|
|
"documents": {
|
|
"krav-rikt-tekstformat.rtf": {
|
|
"authored_titles": 1,
|
|
"titles": [
|
|
"Kravspesifikasjon for tunnelbelysning"
|
|
],
|
|
"bold_runs_that_are_not_titles": 0,
|
|
"declares_heading_style": false,
|
|
"container": "title bold AND at 16pt, then intro, the 20-row table, the caption and the 4x4 grid"
|
|
},
|
|
"krav-rikt-tekstformat-fet-alene.rtf": {
|
|
"authored_titles": 2,
|
|
"titles": [
|
|
"Kravspesifikasjon for tunnelbelysning",
|
|
"Luminanskrav per trafikklasse"
|
|
],
|
|
"bold_runs_that_are_not_titles": 0,
|
|
"declares_heading_style": false,
|
|
"container": "both titles bold at BODY size, no point-size change anywhere"
|
|
},
|
|
"krav-rikt-tekstformat-fet-i-avsnitt.rtf": {
|
|
"authored_titles": 1,
|
|
"titles": [
|
|
"Kravspesifikasjon for tunnelbelysning"
|
|
],
|
|
"bold_runs_that_are_not_titles": 1,
|
|
"declares_heading_style": false,
|
|
"container": "one bold title, then a sentence carrying one bold phrase that continues past it"
|
|
},
|
|
"krav-rikt-tekstformat-stil.rtf": {
|
|
"authored_titles": 2,
|
|
"titles": [
|
|
"Kravspesifikasjon for tunnelbelysning",
|
|
"Luminanskrav per trafikklasse"
|
|
],
|
|
"bold_runs_that_are_not_titles": 0,
|
|
"declares_heading_style": true,
|
|
"container": "a stylesheet declaring \\s1 and \\s2, applied to the two title paragraphs"
|
|
}
|
|
},
|
|
"totals": {
|
|
"documents": 4,
|
|
"authored_titles": 6,
|
|
"bold_runs_that_are_not_titles": 1,
|
|
"documents_declaring_a_heading_style": 1
|
|
}
|
|
}
|
|
}
|