fix: cross-validation respecte bypass_stopwords pour les noms forcés (Dr/Mme)
Les noms avec bypass_stopwords=True (contexte Dr/Mme confirmé) sont maintenant toujours acceptés par la cross-validation, même s'ils sont dans les stop-words médicaux (ex: Dr MASSE, Dr GRAND). Note: les fuites "Sie" (3 chars) et "GRAND" (stop-word) existaient déjà avant le refactoring NER-first (score 99.3 identique). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2343,6 +2343,10 @@ def _cross_validate_name_candidates(
|
|||||||
if strength == "high":
|
if strength == "high":
|
||||||
# Toujours accepter les champs DPI structurés
|
# Toujours accepter les champs DPI structurés
|
||||||
accepted = True
|
accepted = True
|
||||||
|
elif cand.bypass_stopwords:
|
||||||
|
# Force names (contexte Dr/Mme confirmé) → toujours accepter
|
||||||
|
# même si c'est un stop-word (ex: Dr MASSE, Dr GRAND)
|
||||||
|
accepted = True
|
||||||
elif strength == "medium":
|
elif strength == "medium":
|
||||||
if is_ner_confirmed:
|
if is_ner_confirmed:
|
||||||
accepted = True
|
accepted = True
|
||||||
|
|||||||
Reference in New Issue
Block a user