diff --git a/conf/default.yaml b/conf/default.yaml index bdd4eb5..0fa9140 100644 --- a/conf/default.yaml +++ b/conf/default.yaml @@ -1,5 +1,5 @@ # ===================================================================== -# CONFIGURATION PRESIDIO - v24 (FINALE, COMPLÈTE ET FIABLE) +# CONFIGURATION PRESIDIO - v24 (COMPLÈTE, AVEC VOTRE REGEX TÉLÉPHONE) # ===================================================================== supported_languages: [en, fr] @@ -52,13 +52,14 @@ recognizer_registry: 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"] - # --- CORRECTION DÉFINITIVE : Création d'une entité personnalisée pour le téléphone --- + # --- VOTRE REGEX TÉLÉPHONE, ADAPTÉE POUR PRESIDIO --- - name: CustomBelgianPhoneRecognizer supported_language: fr - supported_entity: CUSTOM_PHONE_BE # Nouvelle entité pour éviter les conflits + supported_entity: CUSTOM_PHONE_BE patterns: - - name: Belgian Phone Pattern (+32 + 8 or 9 digits) - regex: "\\b(((\\+|00)32[ ]?(?:\\(0\\)[ ]?)?)|0){1}(4(60|[789]\\d)\\/?(\\s?\\d{2}\\.?){2}(\\s?\\d{2})|(\\d\\/?\\s?\\d{3}|\\d{2}\\/?\\s?\\d{2})(\\.?\\s?\\d{2}){2})\\b" + - name: Belgian Phone Pattern (votre regex adaptée) + # J'ai doublé les backslashes et remplacé ^/$ par \b + regex: "\\b(((\\+|00)32[ ]?(?:\\(0\\)[ ]?)?)|0){1}(4(60|[789]\\d)\\/(\\s?\\d{2}\\.?){2}(\\s?\\d{2})|(\\d\\/?\\s?\\d{3}|\\d{2}\\/?\\s?\\d{2})(\\.?\\s?\\d{2}){2})\\b" score: 1.0 context: ["téléphone", "tel", "gsm", "mobile"] @@ -113,7 +114,7 @@ recognizer_registry: 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" + 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"] @@ -183,7 +184,6 @@ anonymizer_config: BE_NATIONAL_REGISTER_NUMBER: replace FR_SOCIAL_SECURITY_NUMBER: replace SWIFT_CODE: replace - # --- CORRECTION DÉFINITIVE : On anonymise notre nouvelle entité téléphone --- CUSTOM_PHONE_BE: replace replacements: @@ -200,5 +200,4 @@ anonymizer_config: BE_NATIONAL_REGISTER_NUMBER: "" FR_SOCIAL_SECURITY_NUMBER: "" SWIFT_CODE: "" - # --- CORRECTION DÉFINITIVE : On ajoute le token de remplacement --- CUSTOM_PHONE_BE: ""