aboutsummaryrefslogtreecommitdiff
path: root/README.adoc
Commit message (Collapse)AuthorAgeFilesLines
* Close the NRW issue: 17. RÄStV-AusfG as a fourth acceptance caseMatthias Andreas Benkard2026-08-021-3/+5
| | | | | | | | | | | | | | | | Article 4 of the 22nd Broadcasting Amendment Act recasts § 1 of the act implementing the 17th Broadcasting Amendment Treaty. Both the pre- and the post-amendment consolidated version are served by recht.nrw.de, so this closes the last open article of GV. NRW. 7/2026. No production code needed changing: the article carries its single command without an enumeration item, and the recast quote contains nested quotation marks — both are already handled. The result matches the official version of 1 April 2026 character for character, including its editorial placeholders. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Change-Id: If63606d113f2801f0c9e82350215443da8e8be8b
* Run the NRW mass test: WDR-Gesetz and LMG NRWMatthias Andreas Benkard2026-07-281-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 22nd Rundfunkänderungsgesetz amends five laws in one gazette issue. Article 3 (TMZ-Gesetz) was already an acceptance case; this adds the two big ones — Article 1 (WDR-Gesetz, 101 commands across 31 norms) and Article 2 (LMG NRW, 18 commands). Both stem versions come from recht.nrw.de, whose URLs address a version by its date of entry into force, so the results could be checked norm by norm against the official 1 April 2026 consolidations. Applying them turned up work at every layer: Order of application. Renumbering always refers to the original count, not to the state after the preceding items, so a cascade („Absatz 3 wird Absatz 4“, „Absatz 4 wird Absatz 5“, …) applied in document order leaves the law carrying two units of the same name. BefehlAnwender now derives, for each command, which designations it vacates and which it newly occupies, and pulls a vacating command ahead of the first one it collides with. That single rule subsumes the previous §-only special case, orders a cascade descending, and — inside a Sammelbefehl too — keeps a range renumbering from colliding with itself. Bayern's Art. 29a sequence now resolves as well (5 manual residues down to 3). Renumbering an enumeration item. Unlike an Absatz, a Nummer carries its designation as a marker in the text; the applier silently reported success without touching it. It now rewrites the marker and lets a struck placeholder with the target designation give way. Sentence splitting. Gazette citations („(BGBl. I S. 1982)“) and line-initial enumeration markers were splitting sentences, so Satz locators pointed into the wrong place; a sentence may also open with §. Command language: „wie folgt neu gefasst“ and the missing „wird“, a split location („In Absatz 2 wird Satz 1 wie folgt gefasst“), an insertion behind a location prefix, the standalone „Der Punkt am Ende wird durch … ersetzt“, „Dem Wortlaut des Absatzes 3 …“, the verb frame „Es werden ersetzt:“ whose items carry only the location, coordination at „sowie“ and before a punctuation clause, and a stray closing quote at the end of a sentence. Stem format: LandesRechtTextParser reads an „Inhaltsübersicht“ line as the norm of that name (which is what the Angabe commands address) and recognises keyword-less Roman section headings. Everything the two acceptance tests do not apply is named: one command in the WDR-Gesetz whose „Punkt am Ende des Satzes“ is not unambiguous in a two-sentence Nummer. The remaining differences from the official consolidations are places where the official text itself departs from the command wording; SOURCES lists them. Change-Id: I261cf89cd5820f7597bc5db734f322d94b84828e
* Recognise word-anchored insertions; close quotes at the next itemMatthias Andreas Benkard2026-07-281-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Bring the documentation up to the current stateMatthias Andreas Benkard2026-07-261-5/+18
| | | | | | | | | | | | | | | | | The README still described state law as Bavaria-only, six Länder later. The sample-data overview grew a section on how to obtain the pre- amendment stems per portal — which of the three routes works, and that the juris state portals are a dead end — and a short prioritised "where to continue", so the next session does not have to re-derive it. Corrected while writing it: the regression figures are not all pinned the same way. UWG, AGG and ProdHaftG pin "nothing left manual", BayJG pins 154 commands and names its five renumbering residues, and the state cases pin full application. Saying "UWG 19/0, GEG 66/53, …" would have described observations, not what the tests actually assert. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Change-Id: Ie247e9626e789e628d537bede735923d5b67d14b
* Support Bavarian state law (BayJG) with Art./§ inversion and superscriptsMatthias Andreas Benkard2026-07-191-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend ÄndGgner from federal-only to Bavarian state law. Bavarian base laws are structured in Artikel while their amending acts are structured in Paragraphen (inverted from the Bund); official sentence numbers and footnote markers are carried as Unicode superscripts (¹²³, ⁶)). - Generalise Stelle.Paragraph to carry a sigil ("§" or "Art.") and route it through recogniser, applier and resolver (bit-identical Bund output). - Superscript pipeline: geometric detection in FontgroessenFilter (SuperskriptModus BEHALTEN), Superskript util, exact sentence splitting in SatzTeiler, label-based sentence resolution. - BayRechtLoader/BayRechtTextParser for gesetze-bayern.de PDF/plaintext. - §-structured amending acts, GVBl/Landtag column titles, non-breaking spaces, the GVBl continuation quote; Bavarian command forms (footnote aufhebung, Satznummerierung streichung, Wortlaut forms, Halbsatz, gapping chains). Acceptance (EndToEndTest.bayJgGvblAcceptance): the pre-2026 BayJG fassung (BayJG-alt.txt, reconstructed from Wayback single-article snapshots) with GVBl 6/2026 §§ 1-2 applied — 154 commands, 0 unknown, 149 applied automatically, 5 pinned residuals (follow-up edits inside two multi-step renumbering sequences in Art. 29a and Art. 56). Application-side fixes surfaced by the acceptance run (all Bund-safe): sentence-start superscript before §; sentence boundaries = {0} ∪ {each number ≥ 2}; gapping scope inheritance for bare word operations; footnote definition lines hidden from word operations; absatz aufhebung marks "(weggefallen)" keeping its number, and absatz renumbering overwrites an empty placeholder (weggefallen/gegenstandslos) target. 211 tests green (mvnw verify); federal reference numbers unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Change-Id: Iebae4c17ca90755c5fd36251362042f3d5796fd0
* Support Anhang/Anlage targets, Inhaltsübersicht Angabe commands, and ↵Matthias Andreas Benkard2026-07-161-5/+20
| | | | | | | | | | | | | | Gliederungs-Überschriften insertion/replacement Fourth enablement wave: Anhänge/Anlagen resolve as ordinary norm targets with nested Nummer/Buchstabe block resolution, InhaltsuebersichtAnwender applies Angabe commands automatically, GliederungsUeberschriften handles inserting and replacing structural headings, the law's own heading can be recast, and FontgroessenFilter now determines body text per page instead of document-wide. Sample data (UWG/AGG/ProdHaftG) now applies with 0 manual cases. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Change-Id: I1a76750afbecfa1aae734bcdabc91470a28420ca
* Support range structure replacement, struct renumbering, and multi-paragraph ↵Matthias Andreas Benkard2026-07-151-3/+10
| | | | | | | | | | | | blocks Adds bisStelle to StrukturErsetzung for coordinated target ranges, recognizes deletion/renumbering of whole structural units (paragraphs and Gliederung entries), and handles insertion/replacement of multi-paragraph blocks split on §-headings. Updates FASSUNGEN.txt accordingly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Change-Id: I637cc5effbe32c094e62c070b63c470149a77c85
* Add tests, usage documentation, and .claude/ to .gitignore.Matthias Andreas Benkard2026-07-131-0/+40
| | | | | | | | | | | | Unit tests for the gii-norm loader, text cleanup, quote extraction, command recognition (literal sentences from the sample amendment act), sentence splitting, and command application on a synthetic mini law; an HTML renderer test including escaping; and an end-to-end smoke test on the IfSG sample data that skips itself when the (untracked) sample files are absent. The README gains a German usage section. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Change-Id: I7f02ff349f9c3bd34fa90a2a84678b9e6fad697d
* Modularize, avoid shade plugin by default.Matthias Andreas Benkard2020-11-231-2/+1
| | | | Change-Id: I704d78b7553f057f73e1387078623d8fe5d0b154
* Project skeletonMatthias Andreas Benkard2020-11-221-0/+62
Change-Id: I5609adfca13ffad643a3db93e848fc01636b066a