aboutsummaryrefslogtreecommitdiff
path: root/README.adoc
Commit message (Collapse)AuthorAgeFilesLines
* 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