Update default.yaml
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
# =====================================================================
|
# =====================================================================
|
||||||
# CONFIGURATION PRESIDIO - v14 (FINALE ET COMPLÈTE)
|
# CONFIGURATION PRESIDIO - v17 (FINALE, COMPLÈTE ET CORRIGÉE)
|
||||||
# =====================================================================
|
# =====================================================================
|
||||||
supported_languages: [en, fr]
|
supported_languages: [en, fr]
|
||||||
|
|
||||||
@@ -36,43 +36,37 @@ recognizer_registry:
|
|||||||
load_predefined_recognizers: true
|
load_predefined_recognizers: true
|
||||||
|
|
||||||
recognizers:
|
recognizers:
|
||||||
# --- DÉTECTEURS FIABLES ET PRÉCIS UNIQUEMENT ---
|
# --- DÉTECTEURS FIABLES ET PRÉCIS ---
|
||||||
|
|
||||||
- name: CustomDateRecognizer
|
- name: CustomDateRecognizer
|
||||||
supported_language: fr
|
supported_language: fr
|
||||||
supported_entity: CUSTOM_DATE
|
supported_entity: CUSTOM_DATE
|
||||||
patterns:
|
patterns:
|
||||||
- name: Date JJ MM AAAA
|
|
||||||
regex: "\\b(0[1-9]|[12][0-9]|3[01])\\s*(?:janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)\\s*(19|20)\\d{2}\\b"
|
|
||||||
score: 1.0
|
|
||||||
- name: Date JJ/MM/AAAA
|
- name: Date JJ/MM/AAAA
|
||||||
regex: "\\b(0[1-9]|[12][0-9]|3[01])[-/.](0[1-9]|1[012])[-/.](19|20)\\d{2}\\b"
|
regex: "\\b(0[1-9]|[12][0-9]|3[01])[-/.](0[1-9]|1[012])[-/.](19|20)\\d{2}\\b"
|
||||||
score: 1.0
|
score: 1.0
|
||||||
context: ["date", "conclu le", "fait le", "né le"]
|
context: ["date de naissance", "né le"]
|
||||||
|
|
||||||
|
- name: EmailRecognizer
|
||||||
|
supported_language: fr
|
||||||
|
supported_entity: EMAIL_ADDRESS
|
||||||
|
patterns: [{name: Email Pattern, regex: "\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Z|a-z]{2,}\\b", score: 1.0}]
|
||||||
|
context: ["email", "courriel", "mail"]
|
||||||
|
|
||||||
- name: PhoneRecognizer
|
- name: PhoneRecognizer
|
||||||
supported_language: fr
|
supported_language: fr
|
||||||
supported_entity: PHONE_NUMBER
|
supported_entity: PHONE_NUMBER
|
||||||
patterns:
|
patterns:
|
||||||
- name: Phone Pattern Flexible
|
- name: Phone Pattern Flexible (BE/FR)
|
||||||
regex: "\\b(?:\\+|00)(?:32|33)\\s?[1-9](?:[\\s.-]?\\d{1,3}){2,4}\\b"
|
regex: "\\b(?:\\+|00)(32|33)[\\s.-]?\\d(?:[\\s.-]?\\d{2,3}){2,3}\\b"
|
||||||
score: 0.9
|
|
||||||
context: ["téléphone", "tel", "mobile", "gsm", "contact"]
|
|
||||||
|
|
||||||
- name: CreditCardRecognizer
|
|
||||||
supported_language: fr
|
|
||||||
supported_entity: CREDIT_CARD_NUMBER
|
|
||||||
patterns:
|
|
||||||
- name: Credit Card with spaces
|
|
||||||
regex: "\\b(?:4[0-9]{3}(?:[ -]?[0-9]{4}){3}|5[1-5][0-9]{2}(?:[ -]?[0-9]{4}){3})\\b"
|
|
||||||
score: 0.95
|
score: 0.95
|
||||||
context: ["carte bancaire", "visa", "mastercard"]
|
context: ["téléphone", "tel"]
|
||||||
|
|
||||||
- name: IbanRecognizer
|
- name: IbanRecognizer
|
||||||
supported_language: fr
|
supported_language: fr
|
||||||
supported_entity: IBAN
|
supported_entity: IBAN
|
||||||
patterns: [{name: IBAN Pattern, regex: "\\b[A-Z]{2}[0-9]{2}\\s?(?:[A-Z0-9]{4}\\s?){2,7}[A-Z0-9]{1,4}\\b", score: 0.95}]
|
patterns: [{name: IBAN Pattern, regex: "\\b[A-Z]{2}[0-9]{2}\\s?(?:[A-Z0-9]{4}\\s?){2,7}[A-Z0-9]{1,4}\\b", score: 0.95}]
|
||||||
context: ["iban", "compte", "bancaire"]
|
context: ["iban", "compte"]
|
||||||
|
|
||||||
- name: SWIFTRecognizer
|
- name: SWIFTRecognizer
|
||||||
supported_language: fr
|
supported_language: fr
|
||||||
@@ -83,16 +77,27 @@ recognizer_registry:
|
|||||||
score: 1.0
|
score: 1.0
|
||||||
context: ["bic", "swift"]
|
context: ["bic", "swift"]
|
||||||
|
|
||||||
- name: MoneyRecognizer
|
- name: SmartOrganizationRecognizer
|
||||||
supported_language: fr
|
supported_language: fr
|
||||||
supported_entity: MONEY
|
supported_entity: ORGANIZATION
|
||||||
patterns:
|
patterns:
|
||||||
- name: Money Pattern EUR
|
- name: Company Name with Legal Form
|
||||||
regex: "(?:EUR|€)\\s*\\d{1,3}(?:[.,\\s]\\d{3})*(?:[.,]\\d{2})?|\\d{1,3}(?:[.,\\s]\\d{3})*(?:[.,]\\d{2})?\\s*(?:EUR|€)"
|
regex: "\\b([A-Z][a-zà-ÿ]+(?:\\s[A-Z][a-zà-ÿ]+)*)\\s+(SPRL|SARL|SA|SCS|SNC)\\b"
|
||||||
score: 0.9
|
score: 1.0
|
||||||
context: ["montant", "prix", "eur", "euros"]
|
context: ["société", "entreprise"]
|
||||||
|
|
||||||
# --- NUMÉROS D'IDENTIFICATION ---
|
- name: BelgianEnterpriseRecognizer
|
||||||
|
supported_language: fr
|
||||||
|
supported_entity: BE_ENTERPRISE_NUMBER
|
||||||
|
patterns: [{name: BE Enterprise Number, regex: "\\bBE\\s?0\\d{3}[\\.\\s]?\\d{3}[\\.\\s]?\\d{3}\\b", score: 0.95}]
|
||||||
|
context: ["numéro d'entreprise", "BCE"]
|
||||||
|
|
||||||
|
- name: BelgianNRNRecognizer
|
||||||
|
supported_language: fr
|
||||||
|
supported_entity: BE_NATIONAL_REGISTER_NUMBER
|
||||||
|
patterns: [{name: NRN Pattern, regex: "\\b[0-9]{2}\\.[0-9]{2}\\.[0-9]{2}-[0-9]{3}\\.[0-9]{2}\\b", score: 1.0}]
|
||||||
|
context: ["registre national"]
|
||||||
|
|
||||||
- name: FrenchINSEERecognizer
|
- name: FrenchINSEERecognizer
|
||||||
supported_language: fr
|
supported_language: fr
|
||||||
supported_entity: FR_SOCIAL_SECURITY_NUMBER
|
supported_entity: FR_SOCIAL_SECURITY_NUMBER
|
||||||
@@ -101,50 +106,12 @@ recognizer_registry:
|
|||||||
regex: "\\b[12]\\s*[0-9]{2}\\s*(?:0[1-9]|1[0-2])\\s*(?:2[ABab]|[0-9]{2})\\s*[0-9]{3}\\s*[0-9]{3}\\s*[0-9]{2}\\b"
|
regex: "\\b[12]\\s*[0-9]{2}\\s*(?:0[1-9]|1[0-2])\\s*(?:2[ABab]|[0-9]{2})\\s*[0-9]{3}\\s*[0-9]{3}\\s*[0-9]{2}\\b"
|
||||||
score: 0.95
|
score: 0.95
|
||||||
context: ["sécurité sociale", "insee", "nir"]
|
context: ["sécurité sociale", "insee", "nir"]
|
||||||
|
|
||||||
- name: BelgianNRNRecognizer
|
|
||||||
supported_language: fr
|
|
||||||
supported_entity: BE_NATIONAL_REGISTER_NUMBER
|
|
||||||
patterns: [{name: NRN Pattern, regex: "\\b[0-9]{2}\\.[0-9]{2}\\.[0-9]{2}-[0-9]{3}\\.[0-9]{2}\\b", score: 1.0}]
|
|
||||||
context: ["registre national", "nrn", "niss"]
|
|
||||||
|
|
||||||
- name: BelgianEnterpriseRecognizer
|
|
||||||
supported_language: fr
|
|
||||||
supported_entity: BE_ENTERPRISE_NUMBER
|
|
||||||
patterns: [{name: BE Enterprise Number, regex: "\\bBE\\s?0\\d{3}[\\.\\s]?\\d{3}[\\.\\s]?\\d{3}\\b", score: 0.95}]
|
|
||||||
context: ["numéro d'entreprise", "btw", "tva", "BCE", "KBO"]
|
|
||||||
|
|
||||||
|
|
||||||
# 3. LISTE D'EXCLUSION (ALLOW LIST)
|
# 3. LISTE D'EXCLUSION (ALLOW LIST)
|
||||||
# =====================================================================
|
# =====================================================================
|
||||||
allow_list:
|
allow_list:
|
||||||
- Adresse
|
- Adresse
|
||||||
- ADRESSE
|
- ADRESSE
|
||||||
- CONTRAT
|
|
||||||
- PROJET
|
|
||||||
- CONSEILS
|
|
||||||
- PARTIES
|
|
||||||
- DOCUMENT
|
|
||||||
- DEMANDER
|
|
||||||
- CONSEILLERS
|
|
||||||
- QUALIFIÉS
|
|
||||||
- ÉVALUER
|
|
||||||
- IMPLICATIONS
|
|
||||||
- UTILISATION
|
|
||||||
- ATTENDU
|
|
||||||
- QUE
|
|
||||||
- OBLIGATION
|
|
||||||
- CONVERSION
|
|
||||||
- FINANCEMENT
|
|
||||||
- QUALIFIÉ
|
|
||||||
- PRIX
|
|
||||||
- SORTIE
|
|
||||||
- TAXES
|
|
||||||
- DROITS
|
|
||||||
- INFORMATION
|
|
||||||
- DISPOSITIONS
|
|
||||||
- DIVERSES
|
|
||||||
- NOTIFICATIONS
|
|
||||||
- Contrat
|
- Contrat
|
||||||
- Document
|
- Document
|
||||||
- Société
|
- Société
|
||||||
@@ -156,13 +123,16 @@ allow_list:
|
|||||||
- Parties
|
- Parties
|
||||||
- Annexe
|
- Annexe
|
||||||
- Remboursement
|
- Remboursement
|
||||||
|
- Conversion
|
||||||
- Financement
|
- Financement
|
||||||
|
- Sortie
|
||||||
- "Juste Valeur Marchande"
|
- "Juste Valeur Marchande"
|
||||||
- Échéance
|
- Échéance
|
||||||
- Clause
|
- Clause
|
||||||
- Clauses
|
- Clauses
|
||||||
- Principe
|
- Principe
|
||||||
- Coûts
|
- Coûts
|
||||||
|
- Notifications
|
||||||
- Article
|
- Article
|
||||||
- Paragraphe
|
- Paragraphe
|
||||||
- Directeur
|
- Directeur
|
||||||
@@ -181,26 +151,27 @@ allow_list:
|
|||||||
- Euros
|
- Euros
|
||||||
- Taux
|
- Taux
|
||||||
- Valeur
|
- Valeur
|
||||||
|
- Prix
|
||||||
|
|
||||||
# 4. CONFIGURATION DES TRANSFORMATIONS D'ANONYMISATION
|
# 4. CONFIGURATION DES TRANSFORMATIONS D'ANONYMISATION
|
||||||
# =====================================================================
|
# =====================================================================
|
||||||
anonymizer_config:
|
anonymizer_config:
|
||||||
default_anonymizers:
|
default_anonymizers:
|
||||||
# Entités détectées par l'IA (Spacy)
|
# Entités détectées par l'IA (Spacy) et les règles de base de Presidio
|
||||||
PERSON: replace
|
PERSON: replace
|
||||||
LOCATION: replace
|
LOCATION: replace
|
||||||
ORGANIZATION: replace
|
ORGANIZATION: replace
|
||||||
DATE_TIME: replace # Détecteur par défaut de Presidio
|
DATE_TIME: replace
|
||||||
|
CREDIT_CARD_NUMBER: replace # Détecteur par défaut de Presidio
|
||||||
|
MONEY: replace # Détecteur par défaut de Presidio
|
||||||
|
|
||||||
# Entités détectées par nos règles personnalisées
|
# Entités détectées par nos règles personnalisées
|
||||||
CUSTOM_DATE: replace
|
CUSTOM_DATE: replace
|
||||||
CREDIT_CARD_NUMBER: replace
|
EMAIL_ADDRESS: replace
|
||||||
EMAIL_ADDRESS: replace # Détecteur par défaut, mais notre règle peut prendre le dessus
|
|
||||||
PHONE_NUMBER: replace
|
PHONE_NUMBER: replace
|
||||||
IBAN: replace
|
IBAN: replace
|
||||||
MONEY: replace
|
|
||||||
BE_NATIONAL_REGISTER_NUMBER: replace
|
|
||||||
BE_ENTERPRISE_NUMBER: replace
|
BE_ENTERPRISE_NUMBER: replace
|
||||||
|
BE_NATIONAL_REGISTER_NUMBER: replace
|
||||||
FR_SOCIAL_SECURITY_NUMBER: replace
|
FR_SOCIAL_SECURITY_NUMBER: replace
|
||||||
SWIFT_CODE: replace
|
SWIFT_CODE: replace
|
||||||
|
|
||||||
@@ -211,11 +182,11 @@ anonymizer_config:
|
|||||||
DATE_TIME: "<DATE>"
|
DATE_TIME: "<DATE>"
|
||||||
CUSTOM_DATE: "<DATE>"
|
CUSTOM_DATE: "<DATE>"
|
||||||
CREDIT_CARD_NUMBER: "<NUMERO_CARTE_BANCAIRE>"
|
CREDIT_CARD_NUMBER: "<NUMERO_CARTE_BANCAIRE>"
|
||||||
|
MONEY: "<MONTANT>"
|
||||||
EMAIL_ADDRESS: "<EMAIL>"
|
EMAIL_ADDRESS: "<EMAIL>"
|
||||||
PHONE_NUMBER: "<TELEPHONE>"
|
PHONE_NUMBER: "<TELEPHONE>"
|
||||||
IBAN: "<IBAN>"
|
IBAN: "<IBAN>"
|
||||||
MONEY: "<MONTANT>"
|
|
||||||
BE_NATIONAL_REGISTER_NUMBER: "<NRN_BELGE>"
|
|
||||||
BE_ENTERPRISE_NUMBER: "<NUM_ENTREPRISE_BE>"
|
BE_ENTERPRISE_NUMBER: "<NUM_ENTREPRISE_BE>"
|
||||||
|
BE_NATIONAL_REGISTER_NUMBER: "<NRN_BELGE>"
|
||||||
FR_SOCIAL_SECURITY_NUMBER: "<NUM_SECU_FR>"
|
FR_SOCIAL_SECURITY_NUMBER: "<NUM_SECU_FR>"
|
||||||
SWIFT_CODE: "<CODE_SWIFT>"
|
SWIFT_CODE: "<CODE_SWIFT>"
|
||||||
|
|||||||
Reference in New Issue
Block a user