duplicate_checker.py aktualisiert

This commit is contained in:
2025-08-08 06:35:24 +00:00
parent 9539fa1fb9
commit 4a38edacc0

View File

@@ -267,12 +267,12 @@ def main():
metrics = Counter() metrics = Counter()
total = len(match_df) total = len(match_df)
logger.info("Starte Matching-Prozess…") logger.info("Starte Matching-Prozess…")
for i, mrow in match_df.to_dict('records'): processed = 0
pass
# iterate safely with index # iterate safely with index
for idx, mrow in match_df.to_dict('index').items(): for idx, mrow in match_df.to_dict('index').items():
name_disp = mrow.get('CRM Name','') name_disp = mrow.get('CRM Name','')
processed += 1
# Kandidatenwahl # Kandidatenwahl
candidates = [] candidates = []
used_block = '' used_block = ''
@@ -299,7 +299,7 @@ def main():
candidates = [r for _, r in pf[:PREFILTER_LIMIT]] candidates = [r for _, r in pf[:PREFILTER_LIMIT]]
used_block = f"prefilter:{PREFILTER_MIN_PARTIAL}/{len(pf)}" used_block = f"prefilter:{PREFILTER_MIN_PARTIAL}/{len(pf)}"
logger.info(f"Prüfe {idx+1}/{total}: '{name_disp}' -> {len(candidates)} Kandidaten (Block={used_block})") logger.info(f"Prüfe {processed}/{total}: '{name_disp}' -> {len(candidates)} Kandidaten (Block={used_block})")
if not candidates: if not candidates:
results.append({'Match':'', 'Score':0, 'Match_Grund':'keine Kandidaten'}) results.append({'Match':'', 'Score':0, 'Match_Grund':'keine Kandidaten'})
continue continue