Suggestion#

class scikitplot.cleanprompt.Suggestion(text, count, reason, first_offset)[source]#

A candidate the active detectors did not claim.

Parameters:
textstr

The candidate surface, exactly as it appears.

countint

How many times it occurs.

reasonstr

Why it is being offered.

first_offsetint

Where it first appears, so a caller can highlight it.

Parameters:

Notes

Developer notes. A suggestion is never redacted automatically. It is offered for a person to accept, and accepting it adds the term to the literal detector, which is exact. That keeps the guess on the human side of the boundary, where it belongs.

as_dict()[source]#

Return a JSON-safe dictionary.

Return type:

dict[str, Any]

count: int[source]#
first_offset: int[source]#
reason: str[source]#
text: str[source]#