Update default.yaml

This commit is contained in:
Nacim
2025-06-23 15:24:41 +02:00
committed by GitHub
parent 46a3111946
commit 48408a09f2

View File

@@ -4,7 +4,6 @@
# 1. CONFIGURATION DU MOTEUR NLP (Natural Language Processing) # 1. CONFIGURATION DU MOTEUR NLP (Natural Language Processing)
# ===================================================================== # =====================================================================
# On utilise spaCy pour l'anglais et le français.
nlp_engine_name: spacy nlp_engine_name: spacy
supported_languages: [en, fr] supported_languages: [en, fr]
models: models:
@@ -15,14 +14,11 @@ models:
# Configuration fine du modèle NLP pour réduire les faux positifs # Configuration fine du modèle NLP pour réduire les faux positifs
ner_model_configuration: ner_model_configuration:
# On demande au modèle d'être plus sûr de lui avant de labelliser une entité.
confidence_threshold: confidence_threshold:
default: 0.65 # Seuil par défaut pour toutes les entités default: 0.65
PERSON: 0.85 # Très strict pour les noms de personnes PERSON: 0.85
LOCATION: 0.75 # Strict pour les lieux LOCATION: 0.75
ORGANIZATION: 0.7 # Un peu moins strict pour les organisations ORGANIZATION: 0.7
# On ignore les catégories d'entités spaCy qui sont rarement des PII
labels_to_ignore: labels_to_ignore:
- MISC - MISC
- CARDINAL - CARDINAL
@@ -37,9 +33,7 @@ ner_model_configuration:
# 2. DÉFINITION DES DÉTECTEURS (RECOGNIZERS) PERSONNALISÉS # 2. DÉFINITION DES DÉTECTEURS (RECOGNIZERS) PERSONNALISÉS
# ===================================================================== # =====================================================================
# Cette section définit tous nos détecteurs personnalisés basés sur des regex.
recognizers: recognizers:
# -- Données d'identification standards --
- name: EmailRecognizer - name: EmailRecognizer
entity_name: EMAIL_ADDRESS entity_name: EMAIL_ADDRESS
supported_language: fr supported_language: fr
@@ -58,7 +52,6 @@ recognizers:
score: 0.8 score: 0.8
context: ["téléphone", "tel", "mobile", "gsm", "contact"] context: ["téléphone", "tel", "mobile", "gsm", "contact"]
# -- Données financières --
- name: IbanRecognizer - name: IbanRecognizer
entity_name: IBAN entity_name: IBAN
supported_language: fr supported_language: fr
@@ -85,7 +78,6 @@ recognizers:
regex: "(?:EUR|€)\\s*\\d{1,3}(?:[.,\\s]\\d{3})*(?:[.,]\\d{2})?|\\d{1,3}(?:[.,\\s]\\d{3})*(?:[.,]\\d{2})?\\s*(?: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 score: 0.85
# -- Données d'identification belges --
- name: BelgianNRNRecognizer - name: BelgianNRNRecognizer
entity_name: BE_NATIONAL_REGISTER_NUMBER entity_name: BE_NATIONAL_REGISTER_NUMBER
supported_language: fr supported_language: fr
@@ -104,7 +96,6 @@ recognizers:
score: 0.95 score: 0.95
context: ["numéro d'entreprise", "btw", "tva", "BCE", "KBO"] context: ["numéro d'entreprise", "btw", "tva", "BCE", "KBO"]
# -- Données d'identification françaises --
- name: FrenchINSEERecognizer - name: FrenchINSEERecognizer
entity_name: FR_SOCIAL_SECURITY_NUMBER entity_name: FR_SOCIAL_SECURITY_NUMBER
supported_language: fr supported_language: fr
@@ -128,10 +119,8 @@ recognizers:
# 3. ACTIVATION DES DÉTECTEURS # 3. ACTIVATION DES DÉTECTEURS
# ===================================================================== # =====================================================================
# C'est la liste de tous les détecteurs que Presidio doit charger et utiliser.
recognizer_registry: recognizer_registry:
- default # Garder pour les détecteurs intégrés de Presidio (URL, IP_ADDRESS, etc.) - default
# Activation de nos détecteurs personnalisés définis ci-dessus
- EmailRecognizer - EmailRecognizer
- PhoneRecognizer - PhoneRecognizer
- IbanRecognizer - IbanRecognizer
@@ -144,95 +133,47 @@ recognizer_registry:
# 4. LISTE D'EXCLUSION (ALLOW LIST) # 4. LISTE D'EXCLUSION (ALLOW LIST)
# ===================================================================== # =====================================================================
# C'est une étape cruciale pour éviter que des termes métiers soient mal labellisés.
allow_list: allow_list:
# Termes contractuels et juridiques - Contrat
- text: Contrat - Document
type: LOCATION - Société
- text: contrat - Investisseur
type: LOCATION - Montant
- text: Document - Prêt
type: LOCATION - Intérêt
- text: document - Partie
type: LOCATION - Parties
- text: Société - Annexe
type: PERSON - Remboursement
- text: Investisseur - Conversion
type: PERSON - Financement
- text: Montant - Sortie
type: LOCATION - "Juste Valeur Marchande"
- text: Prêt - Échéance
type: LOCATION - Clause
- text: Intérêt - Clauses
type: LOCATION - Principe
- text: Partie - Coûts
type: LOCATION - Notifications
- text: Parties - Article
type: PERSON - Paragraphe
- text: Annexe - Directeur
type: LOCATION - Gérant
- text: Remboursement - Président
type: LOCATION - DocuSign
- text: Conversion - SPRL
type: LOCATION - SA
- text: Financement - Loi
type: LOCATION - Code
- text: Sortie - Règlement
type: LOCATION - Décret
- text: "Juste Valeur Marchande" - Arrêté
type: PERSON - Euro
- text: Échéance - EUR
type: LOCATION - Euros
- text: Clause - Taux
type: LOCATION - Valeur
- text: Clauses - Prix
type: LOCATION
- text: Principe
type: LOCATION
- text: Coûts
type: PERSON
- text: Notifications
type: LOCATION
- text: Article
type: LOCATION
- text: Paragraphe
type: LOCATION
- text: Directeur
type: LOCATION
- text: Gérant
type: LOCATION
- text: Président
type: LOCATION
- text: DocuSign
type: PERSON
- text: SPRL
type: ORG
- text: SA
type: ORG
- text: Loi
type: LOCATION
- text: Code
type: LOCATION
- text: Règlement
type: LOCATION
- text: Décret
type: LOCATION
- text: Arrêté
type: LOCATION
# Termes financiers
- text: Euro
type: LOCATION
- text: EUR
type: LOCATION
- text: Euros
type: LOCATION
- text: Taux
type: LOCATION
- text: Valeur
type: LOCATION
- text: Prix
type: LOCATION
# Mois de l'année
- Janvier - Janvier
- Février - Février
- Mars - Mars
@@ -248,31 +189,25 @@ allow_list:
# 5. CONFIGURATION DES TRANSFORMATIONS D'ANONYMISATION # 5. CONFIGURATION DES TRANSFORMATIONS D'ANONYMISATION
# ===================================================================== # =====================================================================
# Cette section est lue par le service Anonymizer pour savoir comment remplacer les PII.
anonymizer_config: anonymizer_config:
# Remplacement par défaut pour chaque type d'entité.
default_anonymizers: default_anonymizers:
# Entités NLP standard
PERSON: replace PERSON: replace
LOCATION: replace LOCATION: replace
ORGANIZATION: replace ORGANIZATION: replace
DATE_TIME: replace DATE_TIME: replace
# Entités Presidio standard
CREDIT_CARD_NUMBER: replace CREDIT_CARD_NUMBER: replace
EMAIL_ADDRESS: replace EMAIL_ADDRESS: replace
IBAN_CODE: replace # Le recognizer par défaut utilise IBAN_CODE IBAN_CODE: replace
IP_ADDRESS: replace IP_ADDRESS: replace
PHONE_NUMBER: replace PHONE_NUMBER: replace
URL: replace URL: replace
# Entités personnalisées IBAN: replace
IBAN: replace # Notre recognizer custom
MONEY: replace MONEY: replace
BE_NATIONAL_REGISTER_NUMBER: replace BE_NATIONAL_REGISTER_NUMBER: replace
BE_ENTERPRISE_NUMBER: replace BE_ENTERPRISE_NUMBER: replace
FR_SOCIAL_SECURITY_NUMBER: replace FR_SOCIAL_SECURITY_NUMBER: replace
FR_SIREN_SIRET: replace FR_SIREN_SIRET: replace
# Valeurs de remplacement personnalisées
replacements: replacements:
PERSON: "<PERSONNE>" PERSON: "<PERSONNE>"
LOCATION: "<LIEU>" LOCATION: "<LIEU>"
@@ -281,7 +216,7 @@ anonymizer_config:
CREDIT_CARD_NUMBER: "<NUMERO_CARTE_BANCAIRE>" CREDIT_CARD_NUMBER: "<NUMERO_CARTE_BANCAIRE>"
EMAIL_ADDRESS: "<EMAIL>" EMAIL_ADDRESS: "<EMAIL>"
IBAN_CODE: "<IBAN>" IBAN_CODE: "<IBAN>"
IBAN: "<IBAN>" # Pour notre recognizer custom IBAN: "<IBAN>"
IP_ADDRESS: "<ADRESSE_IP>" IP_ADDRESS: "<ADRESSE_IP>"
PHONE_NUMBER: "<TELEPHONE>" PHONE_NUMBER: "<TELEPHONE>"
URL: "<URL>" URL: "<URL>"