| def redaction_density(text: str) -> float: | |
| if not text: | |
| return 0.0 | |
| blocks = text.count("ββββ") + text.count("[REDACTED]") | |
| return round(blocks / max(len(text.split()), 1), 4) |
| def redaction_density(text: str) -> float: | |
| if not text: | |
| return 0.0 | |
| blocks = text.count("ββββ") + text.count("[REDACTED]") | |
| return round(blocks / max(len(text.split()), 1), 4) |