uzp_orzeczenia_pl: G1 personal-data pass applied to the shard (v2#112)

#193
by ppuzio - opened
Commit history is no longer available for this pull request.
Fabryka AI org

Applies the G1 pass to all 34,715 rulings, with NERGAL 2.0.6 (SlayerLab/NERGAL@ce25bc0c, tag v2.0.6), and moves G1's pin from 2.0.4 to 2.0.6. No ruling is dropped. 21,491 rulings change. Characters go from 1,110,310,083 to 1,108,021,951 and tokens from 422,051,565 to 420,753,012.

What G1 masks

  • NERGAL masks person names as [PERSON]. The bench and clerk of each ruling are read from its header and kept.
  • Rules mask:
    • sole-trader and s.c. trading names as [FIRM], with their later mentions and "dalej:" aliases;
    • trading names followed by initials in party and consortium lists;
    • the street addresses next to these names, as [ADDRESS].
  • A sentence that ties a person to a conviction, a charge, a criminal record or health is replaced by [REDACTED:SPECIAL].

Replacements (qa.json → g1.counts)

Kind Replacements
person 255,086
firm 98,078
address 16,925
special sentences 2,558
pii 3,183
phone 538
bench names kept 71,435

NERGAL 2.0.5 and 2.0.6 (first commit; v2#60)

  • 2.0.5's names layer leaves more party, representative and office nouns unmasked ("Wykonawca", "Przewodniczący", "Prezes", "Pełnomocnik", "Protokolant" and others), and a number right after a role ("Odwołujący 1"). Only person_spans changes; model spans, rules and weights are byte-identical to 2.0.4.
  • 2.0.6 grows a kept model span that starts or ends inside a run of digits over the whole run. Its weights are 2.0.5's.
  • On the 320 labelled rulings, per character, 2.0.5 masks nothing 2.0.4 left and unmasks 91 characters (85 in role nouns, 6 in a number after one). Every figure is unchanged except [PERSON] regions over no labelled mention, 151 → 154 (three list letters in seed 1122 S5 left alone once the role noun beside them is unmasked). 2.0.6 changes one of the 320 outputs, 6 more digits under [PII] outside the scored passage; every result file, the held-out sample's included, is byte-identical to 2.0.5's.
  • On the shard, 2.0.6 changes 92 rulings against the same pass on 2.0.5. In 91, digits next to a mask join it; in one, a phone mask that ran over two numbers and stopped inside the second becomes two masks (phone 537 → 538).
  • Of the role nouns, G1 with 2.0.5 or 2.0.6 still removes 129 over the 320 rulings: 120 inside special-category sentences, 2 under [FIRM], 5 in text the scorer cannot align, 2 under [PERSON]. The table per role noun is in the findings entry.

Where the model spans come from

  • The model spans come from a stored CUDA float32 pass with 2.0.4's weights, which 2.0.5 and 2.0.6 share.
  • 2.0.6's person spans are computed over that pass's FastPDN ranges.
  • qa.json g1.model_spans records the stored pass: revision, unit directory sha256 and 543 units.
  • g1 --cache holds the NERGAL step, so a rules change needs no new NERGAL run.

Measured on hand-labelled passages: the header plus one 2,000-character window of each ruling, one labeller (Claude). Full tables are in artifacts/source_findings.md, entry "uzp_orzeczenia_pl — G1 personal-data pass".

Sample Firms wholly masked Addresses Person names left
Seed 112, 240 rulings, stratified 314 → 378/446 64 → 72/90 11 → 10/152
Seed 1122, 80 rulings, rules developed on it S5 118 → 131/148, S6 68 → 118/139 S5 32 → 44/60, S6 17 → 61/65 4 → 3/88
Seed 1123, 80 rulings, held out S5 190 → 215/263, S6 55 → 64/96 S5 64 → 68/100, S6 13/24 3/83, unchanged

On the held-out sample:

  • The firm rules add 14 [FIRM] regions over no labelled mention. They are mostly later short mentions of a firm the rules read as a sole trader's. None is a place name.
  • Special recall stays at 33/38.
  • 21 replaced sentences have no special content, as before the firm rules.

The remaining misses are listed on the card (legitimate_interest.md).

Release: the upload of this source must pass mask_names=false, because G1 has already masked the names. With names off, 2.0.6 masks digits that 2.0.3 to 2.0.5 leave, so dynaword-pipeline should pin 2.0.6 too for the upload scrub to match G1. slayerlabs/dynaword-pipeline#17 moves its pin to 2.0.6.

Also in this PR

  • The rebuilt parquet, attribution (text_sha256, transformations), sample, stats, checksums and qa.json g1.
  • The datasheet totals, and a G1 slice version in artifacts/uzp_orzeczenia_pl_ontology_manifest.json.
  • legitimate_interest.md, the README and sources.py describe the applied pass.

Tests: python3 -m pytest -q on the head commit: 2149 passed, 9 skipped.

🤖 Generated with Claude Code

ppuzio changed pull request status to open
ppuzio changed pull request status to merged
ppuzio deleted the refs/pr/193 ref

Sign up or log in to comment