bugfix
This commit is contained in:
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user