describe_outcome#
- scikitplot.cleanprompt.describe_outcome(result, diagnosis, suggestions=())[source]#
Explain a redaction outcome, especially an empty one.
- Parameters:
- resultRedactionResult
The completed pass.
- diagnosisDiagnosis
What was looking.
- suggestionstuple of Suggestion, default=()
Candidates still in the clear.
- Returns:
- dict
A JSON-safe explanation with
level,headline,detailandactions.levelis"ok","warning"or"alert".
- Parameters:
result (RedactionResult)
diagnosis (Diagnosis)
suggestions (tuple[Suggestion, ...])
- Return type:
Notes
Developer notes.
levelis"alert"for the case that motivated this module: nothing was found and something was not looking. That combination must never render as a neutral “no sensitive values detected”, because the user reads that as “this text is safe to send”.