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
Entryper 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 whyoccurrencesis a tuple rather than a single offset pair.