This commit is contained in:
2025-04-18 10:57:37 +00:00
parent a9695a4473
commit 6d2a50dcdf

View File

@@ -36,19 +36,20 @@ from difflib import SequenceMatcher
import unicodedata
import csv
import gender_guesser.detector as gender
from urllib.parse import urlparse, urlencode
# --- HIER unquote hinzufügen ---
from urllib.parse import urlparse, urlencode, unquote
import argparse
import pandas as pd
import numpy as np
# --- NEUE IMPORTE für ML ---
from sklearn.model_selection import train_test_split, GridSearchCV
from sklearn.impute import SimpleImputer
from sklearn.tree import DecisionTreeClassifier, export_text
from sklearn.metrics import accuracy_score, classification_report, confusion_matrix
import json # Zum Speichern der Muster als JSON (optional)
import pickle # Zum Speichern des trainierten Modells und Imputers
import concurrent.futures # Für parallele Verarbeitung (bereits vorhanden)
import threading # Für Semaphore (bereits vorhanden)
import json
import pickle
import concurrent.futures
import threading
import traceback # Importiere traceback für detailliertere Fehlermeldungen
# --- Ende neue Importe ---
# Optional: tiktoken für Token-Zählung (Modus 8)