license: apache-2.0 language:
Turkish PII detection. A GLiNER model fine-tuned to find personal data in Turkish text so documents can be redacted or pseudonymised before they are sent anywhere else.
Open multilingual PII models now list Turkish among many languages, but they are not built for it. On the independent NeonRedact-TR Bench, this model combined with a checksum-validated rule layer scores 0.790 micro F1, against 0.356 for OpenMed v2 and 0.348 for OpenAI Privacy Filter.
Held-out test split of NeonRedact-TR Bench v1: 300 Turkish documents, 1,206 entities, micro F1 with 95% bootstrap CI.
| This model + rules | This model alone | OpenMed v2 | OpenAI PF | |
|---|---|---|---|---|
| All labels | 0.790 [0.766, 0.814] | 0.730 | 0.356 | 0.348 |
| Person, address, phone, email, date of birth | 0.834 | 0.804 | 0.338 | 0.347 |
| Suffix leakage | 0.0% | 0.0% | 1.4% | 18.4% |
| False alarms on PII-free text | 72.6% | 79.0% | 69.4% | 37.1% |
Weaknesses are reported as found: this model over-flags PII-free text, and has no label for secrets or event dates. Full results, caveats and code: RESULTS.md.
Give it Turkish text and a list of what to look for; it returns character spans. It does not modify the text — what you do with the spans is up to you.
from gliner import GLiNER
model = GLiNER.from_pretrained("neondijital/neonredact-tr-model")
etiketler = [
"kişi adı", "adres", "T.C. kimlik numarası", "vergi kimlik numarası",
"IBAN", "kredi kartı numarası", "cep telefonu", "sabit telefon",
"e-posta adresi", "araç plakası", "doğum tarihi", "kurum adı",
"meslek", "akrabalık", "sağlık durumu", "taraf sıfatı",
]
metin = ("Müvekkilim Ayşe Öztürk'ün T.C. kimlik numarası 85592807206 olup, "
"Konak'taki dairesi kardeşi Mehmet Yılmaz'a devredilmiştir.")
for v in model.predict_entities(metin, etiketler, threshold=0.5):
print(v["label"], "->", v["text"])
Use the label strings above as written. GLiNER reads labels as text, and the model was tuned against these exact phrasings.
Suffixes stay outside the span. Turkish attaches case endings to proper
nouns with an apostrophe. A model that swallows the suffix produces spans
that break redaction: replace Ayşe Öztürk'ün wholesale and the sentence
loses its grammar. This model returns Ayşe Öztürk and leaves 'ün alone.
The same holds for the pronominal buffer in institution names —
Ege Üniversitesi out of Ege Üniversitesi'nden.
Turkey-specific identifiers. T.C. national ID, tax number, Turkish IBAN and licence plates have no equivalent in EU-oriented datasets, so EU-oriented models do not look for them.
People named by role. In Turkish legal and clinical writing the subject
is often a role rather than a name — müvekkilim, davalı, hastam.
Same sentence, same labels, threshold 0.5.
gliner_multi-v2.1 |
this model | |
|---|---|---|
Ayşe Öztürk |
found | found |
85592807206 (T.C. ID) |
missed | found |
0532 111 22 33 |
missed | found |
kardeşi (kinship) |
missed | found |
| IBAN span | IBAN TR3300… (label included) |
TR3300… |
The base model finds names and little else in Turkish, and does not know any Turkish identifier format.
Fine-tuned from urchade/gliner_multi-v2.1 (mDeBERTa backbone) on
neondijital/neonredact-tr
— 10,000 synthetic records, 36 document templates, 16 labels. Three epochs on
a single T4, ~14 minutes.
Three rounds were needed. Round one confused identifier labels with their preceding keywords; round two fixed that but started reading national ID numbers as IBANs; round three separated the identifier types into their own sentence contexts and placed document reference numbers next to real IBANs so the model learns which long number is which. Round three produced no false positives on the held-out probes.
Stated plainly, because they matter in practice.
… 0232 445 67 89 numarasından …) is often not
found. Keep a regex check for landlines alongside this model.eczacıymış comes back whole
rather than as eczacı. Unlike case endings, these suffixes are not set
off by an apostrophe, and three rounds of training did not resolve it.taraf sıfatı is the weakest label — it has the fewest training examples.Pair it with deterministic checks. Checksum-verifiable identifiers — T.C. ID, tax number, IBAN, card number — should be validated by their own algorithms, which are exact where a model only guesses. Use the model for what rules cannot reach: names, addresses, kinship, occupations, roles.
Detection is not compliance. Removing direct identifiers does not make a document anonymous under KVKK or GDPR — a residual combination of attributes (birth year, district, occupation) can still single out one person. Keep a human in the loop before anything leaves the building.
@misc{neonredact_tr_model_2026,
title = {NeonRedact-TR: Turkish PII Detection},
author = {Kömürcü, Aykan},
year = {2026},
url = {https://huggingface.co/neondijital/neonredact-tr-model}
}
Built by NeonDijital.