Files
presidio/presidio-analyzer/presidio_analyzer/conf/default_recognizers.yaml
Thato Mokoena f0dbdce29e feat(analyzer): add nine South African predefined recognizers (#2069)
* feat(analyzer): add nine South African predefined recognizers

Extend ZA coverage beyond ZA_ID_NUMBER with passport, tax, VAT, CIPC
registration, eNaTIS driver's licence and traffic register numbers,
licence plates, and mobile/telephone numbers split by line type.

All recognizers are disabled by default in default_recognizers.yaml.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(analyzer): update year validation logic in South African recognizers

Refactor the year validation logic in the ZaCompanyRegistrationRecognizer and ZaDriverLicenseRecognizer to ensure the current year is accurately checked without allowing for the next year. Remove unnecessary dependency on ZaIdNumberRecognizer in ZaDriverLicenseRecognizer to streamline the code. Update the validate_result method in ZaLicensePlateRecognizer to return a boolean type for consistency.

* fix(analyzer): address Copilot review feedback for ZA recognizers

Correct 08x NSN fallback classification, tighten driver licence validation,
and replace the unstable passport docstring reference.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(analyzer): align ZA driver licence docs and address Copilot round 3

Update driver licence length documentation to 10-14 characters to match
validation constraints, and use PhoneNumberMatcher.number directly instead
of re-parsing matched substrings.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Update CHANGELOG.md

* Update CHANGELOG.md

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Sharon Hart <sharonh.dev@gmail.com>
2026-07-23 12:36:59 +03:00

571 lines
12 KiB
YAML

supported_languages:
- en
global_regex_flags: 26
# To restrict the loaded predefined recognizers to a subset of countries
# (mirrors ``supported_languages``), uncomment ``supported_countries`` and
# list ISO-3166-1 alpha-2 codes (case-insensitive). Locale-agnostic
# recognizers (those without a ``country_code`` below) are always loaded
# regardless of this filter.
#
# supported_countries:
# - us
# - uk
recognizers:
# Recognizers listed here can either be loaded from the recognizers defined in code (type: predefined),
# or created based on the provided configuration (type: custom).
# For predefined:
# - If only a recognizer name is provided, a predefined recognizer with this name and default parameters will be loaded.
# - If a parameter isn't provided, the default one would be loaded.
# - Use 'class_name' to specify the Python class when using a custom 'name' for display/metadata
# - The optional ``country_code`` field (ISO-3166-1 alpha-2) makes the recognizer's country tag
# visible to no-code YAML readers. It must match the recognizer class's ``COUNTRY_CODE``
# attribute; mismatches raise at load time. Locale-agnostic recognizers omit ``country_code``.
# For custom:
# - See an example configuration here: https://github.com/data-privacy-stack/presidio/blob/main/presidio-analyzer/presidio_analyzer/conf/example_recognizers.yaml
# - Custom pattern recognizers with this configuration can be added to this file, with type: custom
# For recognizers supporting more than one language, an instance of the recognizer for each language will be created.
# For example, see the CreditCardRecognizer definition below:
- name: CreditCardRecognizer
supported_languages:
- language: en
context: [credit, card, visa, mastercard, cc, amex, discover, jcb, diners, maestro, instapayment]
- language: es
context: [tarjeta, credito, visa, mastercard, cc, amex, discover, jcb, diners, maestro, instapayment]
- language: it
- language: pl
type: predefined
# score_thresholds:
# default: 0.4
# CREDIT_CARD: 0.7
- name: UsBankRecognizer
supported_languages:
- en
type: predefined
country_code: us
- name: UsLicenseRecognizer
supported_languages:
- en
type: predefined
country_code: us
- name: UsItinRecognizer
supported_languages:
- en
type: predefined
country_code: us
- name: UsPassportRecognizer
supported_languages:
- en
type: predefined
country_code: us
- name: UsSsnRecognizer
supported_languages:
- en
type: predefined
country_code: us
- name: UsMbiRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: us
- name: UsNpiRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: us
- name: NhsRecognizer
supported_languages:
- en
type: predefined
country_code: uk
- name: UkDrivingLicenceRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: uk
- name: UkNinoRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: uk
- name: UkPassportRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: uk
- name: UkPostcodeRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: uk
- name: UkPostcodeRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: uk
- name: UkVehicleRegistrationRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: uk
- name: SgFinRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: sg
- name: AuAbnRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: au
- name: AuAcnRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: au
- name: AuTfnRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: au
- name: AuMedicareRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: au
- name: NgNinRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: ng
- name: NgVehicleRegistrationRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: ng
- name: InPanRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: in
- name: InAadhaarRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: in
- name: InVehicleRegistrationRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: in
- name: InPassportRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: in
- name: EsNifRecognizer
supported_languages:
- es
type: predefined
country_code: es
- name: EsNieRecognizer
supported_languages:
- es
type: predefined
country_code: es
- name: EsPassportRecognizer
supported_languages:
- es
type: predefined
enabled: false
country_code: es
- name: ItDriverLicenseRecognizer
supported_languages:
- it
type: predefined
country_code: it
- name: ItFiscalCodeRecognizer
supported_languages:
- it
type: predefined
country_code: it
- name: ItVatCodeRecognizer
supported_languages:
- it
type: predefined
country_code: it
- name: ItIdentityCardRecognizer
supported_languages:
- it
type: predefined
country_code: it
- name: ItPassportRecognizer
supported_languages:
- it
type: predefined
country_code: it
- name: PhTinRecognizer
supported_languages:
- en
type: predefined
enabled: false
- name: PlPeselRecognizer
supported_languages:
- pl
type: predefined
country_code: pl
- name: KrBrnRecognizer
supported_languages:
- ko
- kr
type: predefined
enabled: false
country_code: kr
- name: KrRrnRecognizer
supported_languages:
- ko
- kr
type: predefined
enabled: false
country_code: kr
- name: KrDriverLicenseRecognizer
supported_languages:
- ko
- kr
type: predefined
enabled: false
country_code: kr
- name: KrFrnRecognizer
supported_languages:
- ko
- kr
type: predefined
enabled: false
country_code: kr
- name: SeOrganisationsnummerRecognizer
supported_languages:
- sv
type: predefined
enabled: false
country_code: se
- name: SePersonnummerRecognizer
supported_languages:
- sv
type: predefined
enabled: false
country_code: se
- name: ZaCompanyRegistrationRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: za
- name: ZaDriverLicenseRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: za
- name: ZaIdNumberRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: za
- name: ZaIncomeTaxNumberRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: za
- name: ZaLicensePlateRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: za
- name: ZaMobileNumberRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: za
- name: ZaPassportRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: za
- name: ZaTrafficRegisterNumberRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: za
- name: ZaTelephoneNumberRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: za
- name: ZaVatNumberRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: za
- name: ThTninRecognizer
supported_languages:
- th
type: predefined
enabled: false
country_code: th
- name: TrNationalIdRecognizer
supported_languages:
- tr
type: predefined
enabled: false
country_code: tr
- name: TrLicensePlateRecognizer
supported_languages:
- tr
type: predefined
enabled: false
country_code: tr
- name: PhUmidRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: ph
- name: HuggingFaceNerRecognizer
supported_languages:
- en
type: predefined
enabled: false
- name: CryptoRecognizer
type: predefined
- name: DateRecognizer
type: predefined
- name: EmailRecognizer
type: predefined
- name: IbanRecognizer
type: predefined
- name: IpRecognizer
type: predefined
- name: MedicalLicenseRecognizer
type: predefined
country_code: us
- name: MacAddressRecognizer
type: predefined
- name: PhoneRecognizer
type: predefined
- name: UrlRecognizer
type: predefined
- name: InVoterRecognizer
type: predefined
enabled: false
country_code: in
- name: InGstinRecognizer
supported_languages:
- en
type: predefined
enabled: false
country_code: in
# Germany recognizers (disabled by default, enable for German-language pipelines)
- name: DeTaxIdRecognizer
supported_languages:
- de
type: predefined
enabled: false
country_code: de
- name: DeTaxNumberRecognizer
supported_languages:
- de
type: predefined
enabled: false
country_code: de
- name: DePassportRecognizer
supported_languages:
- de
type: predefined
enabled: false
country_code: de
- name: DeIdCardRecognizer
supported_languages:
- de
type: predefined
enabled: false
country_code: de
- name: DeSocialSecurityRecognizer
supported_languages:
- de
type: predefined
enabled: false
country_code: de
- name: DeHealthInsuranceRecognizer
supported_languages:
- de
type: predefined
enabled: false
country_code: de
- name: DeKfzRecognizer
supported_languages:
- de
type: predefined
enabled: false
country_code: de
- name: DeHandelsregisterRecognizer
supported_languages:
- de
type: predefined
enabled: false
country_code: de
- name: DePlzRecognizer
supported_languages:
- de
type: predefined
enabled: false
country_code: de
- name: DeLanrRecognizer
supported_languages:
- de
type: predefined
enabled: false
country_code: de
- name: DeBsnrRecognizer
supported_languages:
- de
type: predefined
enabled: false
country_code: de
- name: DeVatIdRecognizer
supported_languages:
- de
type: predefined
enabled: false
country_code: de
- name: DeFuehrerscheinRecognizer
supported_languages:
- de
type: predefined
enabled: false
country_code: de
- name: BasicLangExtractRecognizer
supported_languages:
- en
type: predefined
enabled: false
config_path: presidio_analyzer/conf/langextract_config_basic.yaml
- name: CaSinRecognizer
supported_languages:
- en
- fr
type: predefined
enabled: false
country_code: ca