NeonRedact-TR

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 PII models are trained on English and extended to a handful of other languages. Turkish is in none of them. This is the gap this model fills.

What it does

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.

Why Turkish needs its own model

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.

Base model vs fine-tuned

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.

Training

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.

Known limitations

Stated plainly, because they matter in practice.

  • Bare landline numbers are missed. A landline sitting mid-sentence with no keyword before it (… 0232 445 67 89 numarasından …) is often not found. Keep a regex check for landlines alongside this model.
  • Inflected occupations keep their suffix. 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.
  • Trained on synthetic, template-generated text. Real documents are messier. Validation scores on a held-out split of the training data are optimistic and are not reported here for that reason.
  • No OCR noise, no layout artefacts, no dialectal spelling.

Recommended use

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.

Citation

@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.

Downloads last month
32
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for neondijital/neonredact-tr-model

Finetuned
(14)
this model

Dataset used to train neondijital/neonredact-tr-model