Apply Redactor to Refined Fields
The apply redactor to refined fields step redacts extracted data in output PDFs and optionally replaces redacted text with specified strings.
You can redact fields only after an apply refiner step, because redactor configuration depends on field names specified in Refiner.
Redactor configuration file
A configuration file, redactor_config.json
, defines which fields to redact. If no configuration file is provided, all extracted fields are redacted.
-
To redact a field, enter the field as a case-sensitive JSON key. The field name must be an exact match to field names in Refiner.
-
To customize the type of redaction, use the
type
key. Valid values areblack_box
(default) andwhite_box
. -
To replace redacted text with specified text, use the
replace
key with"type": "white_box"
. Specify a list of replacement strings usingwith_text
.
Here’s a sample redactor configuration:
{
"pii_name1": {
"type": "black_box"
},
"pii_name2": {
"type": "white_box",
"replace": {
"with_text": [
"replacerandomtextstring1",
"replacerandomtextstring2",
"replacerandomtextstring3"
]
}
},
"pii_name3": {}
}