Actualiser conf/default.yaml

This commit is contained in:
2025-07-28 16:18:54 +00:00
parent 0ebe8ed939
commit f92a71bed1

View File

@@ -1,9 +1,9 @@
# ===================================================================== # =====================================================================
# CONFIGURATION PRESIDIO - v24-AMELIOREE (Base fonctionnelle + Détection puissante) # CONFIGURATION PRESIDIO - v24
# ===================================================================== # =====================================================================
supported_languages: [en, fr] supported_languages: [en, fr]
# 1. CONFIGURATION DU MOTEUR NLP (INCHANGÉ) # 1. CONFIGURATION DU MOTEUR NLP
# ===================================================================== # =====================================================================
nlp_configuration: nlp_configuration:
nlp_engine_name: spacy nlp_engine_name: spacy
@@ -30,13 +30,13 @@ nlp_configuration:
LOCATION: 0.4 LOCATION: 0.4
ORGANIZATION: 0.55 ORGANIZATION: 0.55
# 2. CONFIGURATION DU REGISTRE DES DÉTECTEURS (C'est ici que les améliorations sont faites) # 2. CONFIGURATION DU REGISTRE DES DÉTECTEURS
# ===================================================================== # =====================================================================
recognizer_registry: recognizer_registry:
load_predefined_recognizers: true load_predefined_recognizers: true
recognizers: recognizers:
# --- [AMÉLIORÉ] Détecteur de dates pour capturer "15 mars 2025" ET "12/08/1978" ---
- name: FlexibleDateRecognizer - name: FlexibleDateRecognizer
supported_language: fr supported_language: fr
supported_entity: FLEXIBLE_DATE supported_entity: FLEXIBLE_DATE
@@ -49,7 +49,7 @@ recognizer_registry:
score: 1.0 score: 1.0
context: ["date", "né le", "signé le", "incident du"] context: ["date", "né le", "signé le", "incident du"]
# --- [NOUVEAU] Détecteur d'adresses belges complètes ---
- name: BelgianAddressRecognizer - name: BelgianAddressRecognizer
supported_language: fr supported_language: fr
supported_entity: BE_ADDRESS supported_entity: BE_ADDRESS
@@ -59,7 +59,7 @@ recognizer_registry:
score: 1.0 score: 1.0
context: ["demeurant", "adresse", "siège social", "bureaux situés"] context: ["demeurant", "adresse", "siège social", "bureaux situés"]
# --- [AMÉLIORÉ] Détecteur de téléphone pour fixe (02/...) ET mobile (04xx) ---
- name: BelgianPhoneRecognizer - name: BelgianPhoneRecognizer
supported_language: fr supported_language: fr
supported_entity: BE_PHONE_NUMBER supported_entity: BE_PHONE_NUMBER
@@ -68,18 +68,8 @@ recognizer_registry:
regex: "\\b0[1-9](?:[./\\s]?\\d{2,3}){3}\\b" regex: "\\b0[1-9](?:[./\\s]?\\d{2,3}){3}\\b"
score: 0.95 score: 0.95
context: ["Tel", "Tél", "téléphone", "gsm", "mobile"] context: ["Tel", "Tél", "téléphone", "gsm", "mobile"]
# --- [AMÉLIORÉ] Détecteur de numéro d'entreprise SANS le préfixe "BE" obligatoire ---
- name: BelgianEnterpriseRecognizer
supported_language: fr
supported_entity: BE_ENTERPRISE_NUMBER
patterns:
- name: Numéro BCE/TVA Belge (avec ou sans BE)
regex: "\\b(BE)?\\s?0?\\d{3}[\\.\\s]?\\d{3}[\\.\\s]?\\d{3}\\b"
score: 1.0
context: ["BCE", "TVA", "intracommunautaire"]
# --- [AMÉLIORÉ] Détecteur d'organisation pour "SPRL DigitalConsult" ---
- name: SmartOrganizationRecognizer - name: SmartOrganizationRecognizer
supported_language: fr supported_language: fr
supported_entity: ORGANIZATION supported_entity: ORGANIZATION
@@ -92,14 +82,7 @@ recognizer_registry:
score: 0.9 score: 0.9
context: ["société", "entreprise", "gérant de la"] context: ["société", "entreprise", "gérant de la"]
# --- [NOUVEAU] Détecteur pour les banques ---
- name: BankOrganizationRecognizer
supported_language: fr
supported_entity: ORGANIZATION
supported_tokens: ["BNP Paribas Fortis", "CBC Banque"]
score: 0.95
# --- [NOUVEAU] Détecteur pour l'ID professionnel "n° IEC: 567890" ---
- name: ProfessionalIdRecognizer - name: ProfessionalIdRecognizer
supported_language: fr supported_language: fr
supported_entity: BE_PRO_ID supported_entity: BE_PRO_ID
@@ -108,8 +91,18 @@ recognizer_registry:
regex: "(n°\\sIEC:?|IEC:?)\\s*\\d{6}" regex: "(n°\\sIEC:?|IEC:?)\\s*\\d{6}"
score: 1.0 score: 1.0
context: ["expert-comptable"] context: ["expert-comptable"]
- name: BelgianEnterpriseRecognizer
supported_language: fr
supported_entity: BE_ENTERPRISE_NUMBER
patterns:
- name: Numéro BCE/TVA Belge (avec ou sans BE)
regex: "\\b(BE)?\\s?0?\\d{3}[\\.\\s]?\\d{3}[\\.\\s]?\\d{3}\\b"
score: 1.0
context: ["BCE", "TVA", "intracommunautaire"]
# --- Détecteurs de votre fichier initial qui étaient déjà corrects ---
- name: EmailRecognizer - name: EmailRecognizer
supported_language: fr supported_language: fr
supported_entity: EMAIL_ADDRESS supported_entity: EMAIL_ADDRESS
@@ -125,11 +118,18 @@ recognizer_registry:
supported_entity: BE_NATIONAL_REGISTER_NUMBER 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}] 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"] context: ["registre national"]
- name: FrenchINSEERecognizer
supported_language: fr
supported_entity: FR_SOCIAL_SECURITY_NUMBER
patterns:
- name: INSEE Pattern with flexible spaces
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
context: ["sécurité sociale", "insee", "nir"]
# 3. LISTE D'EXCLUSION (ALLOW LIST) (INCHANGÉ) # 3. LISTE D'EXCLUSION (ALLOW LIST)
# ===================================================================== # =====================================================================
allow_list: allow_list:
- Adresse
- ADRESSE - ADRESSE
- Contrat - Contrat
- Document - Document
@@ -172,11 +172,11 @@ allow_list:
- Valeur - Valeur
- Prix - Prix
# 4. CONFIGURATION DES TRANSFORMATIONS D'ANONYMISATION (Légèrement complété) # 4. CONFIGURATION DES TRANSFORMATIONS D'ANONYMISATION
# ===================================================================== # =====================================================================
anonymizer_config: anonymizer_config:
default_anonymizers: default_anonymizers:
# Entités existantes # Entités de base
PERSON: replace PERSON: replace
LOCATION: replace LOCATION: replace
ORGANIZATION: replace ORGANIZATION: replace
@@ -186,15 +186,15 @@ anonymizer_config:
IBAN: replace IBAN: replace
BE_ENTERPRISE_NUMBER: replace BE_ENTERPRISE_NUMBER: replace
BE_NATIONAL_REGISTER_NUMBER: replace BE_NATIONAL_REGISTER_NUMBER: replace
FR_SOCIAL_SECURITY_NUMBER: replace
BE_PHONE_NUMBER: replace BE_PHONE_NUMBER: replace
# [NOUVEAU] Ajout des nouvelles entités à anonymiser
FLEXIBLE_DATE: replace FLEXIBLE_DATE: replace
BE_ADDRESS: replace BE_ADDRESS: replace
BE_PRO_ID: replace BE_PRO_ID: replace
IP_ADDRESS: replace # Important pour anonymiser l'adresse IP IP_ADDRESS: replace
replacements: replacements:
# Remplacements existants # Remplacements de base
PERSON: "<PERSONNE>" PERSON: "<PERSONNE>"
LOCATION: "<LIEU>" LOCATION: "<LIEU>"
ORGANIZATION: "<ORGANISATION>" ORGANIZATION: "<ORGANISATION>"
@@ -204,8 +204,9 @@ anonymizer_config:
IBAN: "<IBAN>" IBAN: "<IBAN>"
BE_ENTERPRISE_NUMBER: "<NUM_ENTREPRISE_BE>" BE_ENTERPRISE_NUMBER: "<NUM_ENTREPRISE_BE>"
BE_NATIONAL_REGISTER_NUMBER: "<NRN_BELGE>" BE_NATIONAL_REGISTER_NUMBER: "<NRN_BELGE>"
FR_SOCIAL_SECURITY_NUMBER: "<NUM_SECU_FR>"
BE_PHONE_NUMBER: "<TELEPHONE_BE>" BE_PHONE_NUMBER: "<TELEPHONE_BE>"
# [NOUVEAU] Ajout des remplacements pour les nouvelles entités # Ajout des remplacements pour les nouvelles entités SÛRES
FLEXIBLE_DATE: "<DATE>" FLEXIBLE_DATE: "<DATE>"
BE_ADDRESS: "<ADRESSE_BELGE>" BE_ADDRESS: "<ADRESSE_BELGE>"
BE_PRO_ID: "<ID_PROFESSIONNEL>" BE_PRO_ID: "<ID_PROFESSIONNEL>"