Entry#

class scikitplot.cleanprompt.Entry(label, kind, ordinal, original, occurrences, detector, confidence=1.0)[source]#

One resolved detection and the placeholder label assigned to it.

Parameters:
labelstr

The rendered placeholder, for example "[EMAIL-1]".

kindstr

Category of the detection.

ordinalint

1-based index within kind, in first-appearance order.

originalstr

The secret surface this label stands for.

occurrencestuple of tuple of int

Every (start, end) offset in the original text that this label replaced, in ascending order.

detectorstr

Name of the detector that produced the first occurrence.

confidencefloat

Confidence of the first occurrence.

Parameters:

Notes

Developer notes. One Entry per distinct value, not per occurrence: repeating a name ten times yields one entry with ten occurrences and one label. That is what makes the redacted text readable to a language model, and it is why occurrences is a tuple rather than a single offset pair.

confidence: float = 1.0#
property count: int#

How many times this value was replaced.

Type:

int

detector: str[source]#
kind: str[source]#
label: str[source]#
occurrences: tuple[tuple[int, int], ...][source]#
ordinal: int[source]#
original: str[source]#