aboutsummaryrefslogtreecommitdiff
path: root/src/test/resources
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2026-07-28 06:00:16 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2026-07-28 06:00:16 +0200
commit5f30f566873c313b554f087c0f7e132efa54d64a (patch)
tree4f6c33a0a1e9a6b2b1ad29bffef4defd0990fef2 /src/test/resources
parent79b88e0a8cb4dfc9c33fe219045f3da7f64256c4 (diff)
Recognise word-anchored insertions; close quotes at the next item
The documented next step was the word-anchored structural insertion ("Vor den Wörtern „Aus dem Bereich Verkehr:“ wird folgender Absatz 5 eingefügt", Berlin Artikel 1 Nr. 2 b) bb)). StrukturEinfuegung now carries an optional WortAnker, the recogniser has a pattern for the form — placed before STRUKTUR_EINFUEGUNG, which bails out of recognition entirely when the StellenParser cannot read "den Wörtern «0»" — and the applier positions the new unit at the anchor line instead of a structural boundary. Two blockers turned up next to it, both measured on the corpus rather than assumed: The command was not cleanly recognisable at all. Its closing quotation mark is missing in the official text, so the quote swallowed items cc) and c); an anchor alone would have made the command look applicable with a huge foreign quote as its payload. The docs called a boundary at enumeration markers impossible, and that holds for the unguarded form: a quoted amendment provision carries command language itself. Guarded by four conditions together — the article's quotation marks demonstrably do not balance, the next line's marker is at the same or a shallower level than the one the quote opened on, that line carries command language, and closing here leaves the rest of the article balanced — it fires exactly twice in the whole sample corpus, both times where the missing mark belongs: Berlin before cc), and GV. NRW. Artikel 2 before 12. Without the guards it also fires inside quoted amendment provisions in the BayJG and GModG documents; the balance gate rules those out. The GV.-NRW. gazette encodes part of its umlauts decomposed (u + U+0308, 79 places, dozens of them "eingefügt:"/"angefügt:"). Invisible in the text, but a different word to every command pattern, so those commands could never match. TextBereiniger now normalises to NFC first — not NFKC, which would flatten the official sentence numbers ¹²³ and take SatzTeiler and Superskript their basis. Every other sample document, every gii-XML stem and every hand-kept plain-text stem is already NFC, so the pinned figures stay bit-identical. Berlin Artikel 1 is thereby fully recognised (6 of 6 commands, none unknown). One pinned statement changed for a stated reason: the NRW acceptance test asserted the article-heading warning, which is now preempted by the item boundary inside Artikel 2 — Nr. 12 survives instead of being swallowed. 241 tests green. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Change-Id: Ic579bec6fecc2495a61b3dcf87c9ad71b42f34ae
Diffstat (limited to 'src/test/resources')
0 files changed, 0 insertions, 0 deletions