加载中…
加载中…
A fine-tune of akdeniz27/bert-base-turkish-cased-ner
that finds person names in Turkish clinical text (lab reports, discharge summaries, consult notes, nursing
notes, ward handover lists), including lower / upper-case names and names with case suffixes ("Öztürk'ün",
"Koç'tan"). It is the name detector of the PII-masking gateway in
secure-clinical-llm, where it runs together with
checksum-validated rules for ID numbers, phones, e-mails and IBANs and a fail-closed privacy gate.
Weights are stored in float16 (220 MB). The label set is unchanged from the base model
(O, B/I-PER, B/I-ORG, B/I-LOC); only PER was supervised during fine-tuning.
from transformers import pipeline
ner = pipeline("token-classification", model="yagmurtuncer/bert-base-turkish-clinical-ner",
aggregation_strategy="simple")
ner("Hasta ayşe yılmaz'ın kontrolü Dr. Mehmet Kaya tarafından yapıldı.")
Inside secure-clinical-llm: HFNer("yagmurtuncer/bert-base-turkish-clinical-ner"), or set
SCLLM_NER_MODEL to this id.
src/scllm/pii/synthetic.py.scripts/train_ner.py.
training.json in this repo holds the exact settings and loss log.| Test set | Base model | This model |
|---|---|---|
| 1,000 synthetic documents, held-out template families and names: name recall | 0.988 | 1.000 |
| same set: documents with ≥1 identifier left unmasked (full gateway) | 2.0 % | 0 % (95% upper bound 0.38 %) |
| WikiANN Turkish test, 1,000 real sentences: person-name F1 | 0.724 | 0.705 |
The held-out set checks generalization to document formats and names the model never saw; WikiANN checks that fine-tuning on synthetic text did not break name detection on real text (a small precision loss, no collapse).