i008's picture
HerBERT Polish legal NER (general): weights + ONNX + card + examples
399294e verified
|
Raw History Blame Contribute Delete
2.33 kB

Where the model shines — hard cases handled well

Difficult inputs this general-purpose model gets right. All inputs are synthetic (fictional names); outputs are the model's actual predictions (quantized ONNX, recall-first PER threshold 0.2). Reproduce with strong_cases.py.

Polish inflection (declension)

Polish surnames change form by grammatical case; the model tags the full inflected surface, not just the nominative:

Input Case Model
Pozew skierowano przeciwko Jerzemu Sekule. dative PER 'Jerzemu Sekule'
Sprawa dotyczy akt Wojciecha Michalika. genitive PER 'Wojciecha Michalika'

Tricky surface forms

Input Why it's hard Model
Powódka Anna Nowak-Kowalska złożyła wniosek. hyphenated double surname → one span PER 'Anna Nowak-Kowalska'
Stawiła się ALEKSANDRA ŚWIDERSKA, pełnomocnik. ALL-CAPS header/signature style PER 'ALEKSANDRA ŚWIDERSKA'
Z poważaniem, / Iga Mełech / radca prawny short female first + rare surname in a low-cue signature PER 'Iga Mełech'

Mild / moderate OCR noise

Light scan corruption (missing diacritics, a few confusable characters) is still handled:

Input Behind the garble Model
Pozwany Damian Zotadek wniósł odpowiedź na pozew. Damian Żołądek (lost diacritics) PER 'Damian Zotadek'
Z powództwa Jiga Bękowiki przeciwko spółce. Jaga Bętkowski PER 'Jiga Bękowiki'
Pełnomocnik: Ptek Gostoiski, adwokat. Patryk Gostomski PER 'Ptek Gostoiski'

Heavy OCR garble is this variant's weak spot — see KNOWN_LIMITATIONS.md. For scanned documents prefer the OCR-robust variant.

Multiple types + public/private distinction

Jan Kowalski, zam. ul. Słoneczna 5 w Krakowie, PESEL 02070803628.
   PER      'Jan Kowalski'
   LOC      'ul. Słoneczna 5'      ← private address (masked)
   LOC_PUB  'Krakowie'             ← public city (kept by default)
   ID       '02070803628'          ← national id (PESEL)

The model keeps the public place (Krakowie) visible while masking the private street address — so the legal context survives anonymisation.