Summary
This issue proposes adding Turkey-specific PII recognizers to Presidio Analyzer, following the same pattern established by existing country-specific recognizers (e.g., German recognizers in #1828, UK recognizers in #1862).
Proposed Recognizers
1. TrNationalIdRecognizer — TR_NATIONAL_ID
Turkish National Identification Number (TC Kimlik No / TCKN).
- 11-digit number, first digit ≠ 0
- Checksum validation based on the official Nüfus ve Vatandaşlık İşleri Genel Müdürlüğü (NVI) algorithm, widely documented in Turkish software engineering resources and referenced in KVKK compliance guidelines
2. TrLicensePlateRecognizer — TR_LICENSE_PLATE
Turkish vehicle license plates (standard civilian format).
- Format:
[province_code 01-81] [1-3 letters] [2-4 digits]
- Province code validation (01–81)
- Scope: standard civilian plates only (diplomatic CD/CC and temporary S-plates are out of scope for this PR)
- Examples:
34 ABC 1234, 06 A 123
3. TrPhoneNumberRecognizer — TR_PHONE_NUMBER (lower priority)
Turkish mobile phone numbers.
- Supports international (
+90 5XX ...), national (0 5XX ...), and local (5XX ...) formats
- Format-only validation (no operator prefix validation, as mobile number portability / MNP makes operator-based checks unreliable)
- Reference: ITU-T E.164, Turkey country code +90
Implementation Plan
I plan to implement these in separate PRs to keep reviews focused:
- PR 1:
TrNationalIdRecognizer (TCKN) — highest value, well-defined algorithm
- PR 2:
TrLicensePlateRecognizer
- PR 3:
TrPhoneNumberRecognizer (if the approach is agreed upon)
All recognizers will be disabled by default in default_recognizers.yaml, placed under country_specific/turkey/, with full unit tests and documentation updates.
Related
Summary
This issue proposes adding Turkey-specific PII recognizers to Presidio Analyzer, following the same pattern established by existing country-specific recognizers (e.g., German recognizers in #1828, UK recognizers in #1862).
Proposed Recognizers
1.
TrNationalIdRecognizer—TR_NATIONAL_IDTurkish National Identification Number (TC Kimlik No / TCKN).
2.
TrLicensePlateRecognizer—TR_LICENSE_PLATETurkish vehicle license plates (standard civilian format).
[province_code 01-81] [1-3 letters] [2-4 digits]34 ABC 1234,06 A 1233.
TrPhoneNumberRecognizer—TR_PHONE_NUMBER(lower priority)Turkish mobile phone numbers.
+90 5XX ...), national (0 5XX ...), and local (5XX ...) formatsImplementation Plan
I plan to implement these in separate PRs to keep reviews focused:
TrNationalIdRecognizer(TCKN) — highest value, well-defined algorithmTrLicensePlateRecognizerTrPhoneNumberRecognizer(if the approach is agreed upon)All recognizers will be disabled by default in
default_recognizers.yaml, placed undercountry_specific/turkey/, with full unit tests and documentation updates.Related