Fine-tuned
clarin-pl/FastPDN
for detecting personal data (PII) and organizations in Polish text.
House numbers are intentionally excluded from NER — handled downstream by regex in post-processing.
Intended use: Polish web forms — browser-side inference via
@xenova/transformers + ONNX Runtime Web (WASM),
no backend required.
Fine-tuned for 3 epochs with early stopping (patience=2), best checkpoint selected by eval F1 STREET.
1from transformers import pipeline
2
3ner = pipeline(
4 "token-classification",
5 model="ArkadiuszPawlak/fastpdn-ner-polish-pii",
6 aggregation_strategy="simple",
7)
8result = ner("Jan Kowalski mieszka przy ul. Marszałkowskiej 1, 00-001 Warszawa.")
9# [{"entity_group": "PERSON", "word": "Jan Kowalski", ...},
10# {"entity_group": "STREET", "word": "ul. Marszałkowskiej", ...},
11# {"entity_group": "CITY", "word": "Warszawa", ...}]
1import { pipeline } from "@xenova/transformers";
2
3const ner = await pipeline(
4 "token-classification",
5 "ArkadiuszPawlak/fastpdn-ner-polish-pii",
6 { dtype: "q8", aggregation_strategy: "simple" }
7);
8
9const raw = await ner("Jan Kowalski mieszka przy ul. Marszałkowskiej 1 w Warszawie.");
10console.log(raw);
11// [{ entity_group: "PERSON", word: "Jan Kowalski", score: 0.99 },
12// { entity_group: "STREET", word: "ul. Marszałkowskiej", score: 0.98 },
13// { entity_group: "CITY", word: "Warszawa", score: 0.97 }]