FOIA_Doc_Search / core /redaction.py
GodsDevProject's picture
Upload 20 files
5830944 verified
raw
history blame contribute delete
240 Bytes
def redaction_confidence(result: dict) -> float:
url = result.get("url","").lower()
score = 0.9
if "pdf" in url: score -= 0.3
if "redact" in url: score -= 0.4
if "download" in url: score -= 0.2
return max(0.0, score)