Update brancheneinstufung.py
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Neue Version mit Wikipedia-Validierung, GPT-Schutz und Antwortlogging inkl. Retry + Zeitstempel
|
||||
# Neue Version mit Wikipedia-Validierung, GPT-Schutz und Antwortlogging inkl. Retry + Zeitstempel + Validierung für Wikipedia-Fund
|
||||
|
||||
import os
|
||||
import time
|
||||
@@ -183,6 +183,11 @@ def classify_company(row, wikipedia_url=""):
|
||||
if len(parts) != 8:
|
||||
parts = ["k.A."] * 8
|
||||
|
||||
# Korrektur: Nur übernehmen, wenn Wikipedia-URL vorhanden
|
||||
if not wikipedia_url:
|
||||
parts[0] = "k.A."
|
||||
parts[2] = "k.A."
|
||||
|
||||
with open(LOG_CSV, "a", newline="", encoding="utf-8") as log:
|
||||
writer = csv.writer(log, delimiter=";")
|
||||
writer.writerow([datetime.now().strftime("%Y-%m-%d %H:%M:%S"), row[0], *parts, full_text])
|
||||
|
||||
Reference in New Issue
Block a user