This commit is contained in:
2025-06-20 16:20:54 +00:00
parent c881015346
commit 74c33d7239

View File

@@ -108,6 +108,18 @@ IMPUTER_FILE = "median_imputer.pkl"
PATTERNS_FILE_TXT = "technician_patterns.txt" # Alt (Optional beibehalten)
PATTERNS_FILE_JSON = "technician_patterns.json" # Neu (Empfohlen)
def normalize_for_mapping(text):
"""
Normalisiert einen String aggressiv für Mapping-Zwecke.
Muss VOR der Config-Klasse definiert werden, da sie dort verwendet wird.
"""
if not isinstance(text, str):
return ""
text = text.lower()
text = text.strip()
text = re.sub(r'[^a-z0-9]', '', text)
return text
# --- Globale Konfiguration Klasse ---
class Config:
"""Zentrale Konfigurationseinstellungen."""