scrubPii()
scrubPii(
text):object
Defined in: eval/src/dataset/pii.ts:254
Replace the personal data detectPii finds in one value with [email],
[card] or [iban]. It uses the same detectors, so it finds what the
scan finds and nothing more: names, phone numbers, postal addresses and ids
in free text stay. It passes over the text in the order email, IBAN, card until
nothing is left to replace (at most four rounds), so a card-like run inside an address or an
IBAN goes with it and a value that stood next to a replaced one is found. Run detectPii on
the result to catch a bug in the replacer.
Parameters
text
string
One string value
Returns
object
The scrubbed text and how many values of each kind were replaced
counts
counts:
ScrubCounts
text
text:
string