Update default.yaml

This commit is contained in:
Nacim
2025-06-23 22:18:16 +02:00
committed by GitHub
parent d6893459a2
commit 28acd8cd43

View File

@@ -1,5 +1,5 @@
# ===================================================================== # =====================================================================
# CONFIGURATION PRESIDIO COMPLÈTE - RGPD FRANÇAIS/BELGE - v3 (Précision Max) # CONFIGURATION PRESIDIO - v4 (PROPRE ET AFFINÉE)
# ===================================================================== # =====================================================================
supported_languages: [en, fr] supported_languages: [en, fr]
@@ -24,10 +24,12 @@ nlp_configuration:
- PRODUCT - PRODUCT
- QUANTITY - QUANTITY
- WORK_OF_ART - WORK_OF_ART
# Abaisser le seuil pour les entités qui n'étaient pas détectées
confidence_thresholds: confidence_thresholds:
DEFAULT_CONFIDENCE: 0.65 DEFAULT_CONFIDENCE: 0.65
PERSON: 0.85 PERSON: 0.85
LOCATION: 0.75 LOCATION: 0.4 # MODIFIÉ : Accepte les adresses même avec une faible confiance
DATE_TIME: 0.4 # MODIFIÉ : Accepte les dates même avec une faible confiance
ORGANIZATION: 0.7 ORGANIZATION: 0.7
# 2. CONFIGURATION DU REGISTRE DES DÉTECTEURS # 2. CONFIGURATION DU REGISTRE DES DÉTECTEURS
@@ -36,6 +38,7 @@ recognizer_registry:
load_predefined_recognizers: true load_predefined_recognizers: true
recognizers: recognizers:
# --- DÉTECTEURS EXISTANTS ---
- name: EmailRecognizer - name: EmailRecognizer
supported_language: fr supported_language: fr
supported_entity: EMAIL_ADDRESS supported_entity: EMAIL_ADDRESS
@@ -54,20 +57,6 @@ recognizer_registry:
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", "bancaire"]
- name: CreditCardRecognizer
supported_language: fr
supported_entity: CREDIT_CARD_NUMBER
patterns:
- name: Credit Card Pattern with spaces
regex: "\\b(?:4[0-9]{3}(?:\\s?[0-9]{4}){3}|5[1-5][0-9]{2}(?:\\s?[0-9]{4}){3}|6(?:011|5[0-9]{2})(?:\\s?[0-9]{4}){3}|3[47][0-9]{2}(?:\\s?[0-9]{6})(?:\\s?[0-9]{5})|3(?:0[0-5]|[68][0-9])(?:\\s?[0-9]{4})(?:\\s?[0-9]{4})(?:\\s?[0-9]{3})|(?:2131|1800|35\\d{3})(?:\\s?\\d{4}){2}\\d{3})\\b"
score: 0.9
context: ["carte bancaire", "visa", "mastercard", "amex"]
- name: MoneyRecognizer
supported_language: fr
supported_entity: MONEY
patterns: [{name: Money Pattern EUR, regex: "(?:EUR|€)\\s*\\d{1,3}(?:[.,\\s]\\d{3})*(?:[.,]\\d{2})?|\\d{1,3}(?:[.,\\s]\\d{3})*(?:[.,]\\d{2})?\\s*(?:EUR|€)", score: 0.85}]
- name: BelgianNRNRecognizer - name: BelgianNRNRecognizer
supported_language: fr supported_language: fr
supported_entity: BE_NATIONAL_REGISTER_NUMBER supported_entity: BE_NATIONAL_REGISTER_NUMBER
@@ -80,38 +69,13 @@ recognizer_registry:
patterns: [{name: BE Enterprise Number, regex: "\\bBE\\s?0\\d{3}[\\.\\s]?\\d{3}[\\.\\s]?\\d{3}\\b", score: 0.95}] 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"] context: ["numéro d'entreprise", "btw", "tva", "BCE", "KBO"]
- name: FrenchINSEERecognizer # --- CORRECTION MAJEURE : Règle BIC/SWIFT stricte ---
supported_language: fr
supported_entity: FR_SOCIAL_SECURITY_NUMBER
patterns: [{name: INSEE Pattern, 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"]
- name: FrenchSIRENSIRETRecognizer
supported_language: fr
supported_entity: FR_SIREN_SIRET
patterns:
- {name: SIRET Pattern, regex: "\\b[0-9]{3}[\\s]?[0-9]{3}[\\s]?[0-9]{3}[\\s]?[0-9]{5}\\b", score: 0.9}
- {name: SIREN Pattern, regex: "\\b[0-9]{3}[\\s]?[0-9]{3}[\\s]?[0-9]{3}\\b", score: 0.85}
context: ["siren", "siret"]
- name: BelgianIDCardRecognizer
supported_language: fr
supported_entity: BE_ID_CARD_NUMBER
patterns: [{name: "Belgian ID Card Number", regex: "\\b\\d{3}-\\d{7}-\\d{2}\\b", score: 1.0}]
context: ["carte d'identité", "eid"]
- name: BelgianLicensePlateRecognizer
supported_language: fr
supported_entity: BE_LICENSE_PLATE
patterns: [{name: "Belgian License Plate", regex: "\\b(?:[12]-\\w{3}-\\d{3}|\\w{3}-\\d{3})\\b", score: 0.8}]
context: ["plaque", "immatriculation"]
- name: BICRecognizer - name: BICRecognizer
supported_language: fr supported_language: fr
supported_entity: BE_BIC supported_entity: BE_BIC
patterns: patterns:
- name: BIC/SWIFT Code - name: BIC/SWIFT Code
regex: "\\b[A-Z]{6}[A-Z0-9]{2}(?:[A-Z0-9]{3})?\\b" regex: "\\b([A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?)\\b"
score: 1.0 score: 1.0
context: ["bic", "swift"] context: ["bic", "swift"]
@@ -120,7 +84,7 @@ recognizer_registry:
supported_entity: JOB_TITLE supported_entity: JOB_TITLE
patterns: patterns:
- name: Common Job Titles - name: Common Job Titles
regex: "(?i)\\b(Gérant|Directeur|Directrice|Président|CEO|CFO|CTO|Manager|Responsable|Chef de projet)\\b" regex: "(?i)\\b(Gérant|Directeur des Investissements|Directeur|Directrice|Président|CEO|CFO|CTO|Manager|Responsable|Chef de projet)\\b"
score: 0.8 score: 0.8
context: ["représentée par", "fonction", "poste", "attention de"] context: ["représentée par", "fonction", "poste", "attention de"]
@@ -133,9 +97,11 @@ recognizer_registry:
score: 0.9 score: 0.9
context: ["société", "entreprise"] context: ["société", "entreprise"]
# 3. LISTE D'EXCLUSION # 3. LISTE D'EXCLUSION (ALLOW LIST)
# ===================================================================== # =====================================================================
allow_list: allow_list:
- fictive
- fictives
- Contrat - Contrat
- Document - Document
- Société - Société