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, detail and actions. level is "ok", "warning" or "alert".

Parameters:
Return type:

dict[str, Any]

Notes

Developer notes. level is "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”.