Skip to main content

Detection vs De-identification

DetectionDe-identification
Methodanalyze_proprietary()deidentify_text_outputs()
Changes the text?No — lists what's sensitiveYes — returns safer text
Use it toReview or audit before changing anythingProduce output for an LLM, storage, another system

Most integrations call de-identification directly. Use detection when a human needs to see and approve what will change first.

Detect​

Python
from custodian_labs import GuardianLayer

result = GuardianLayer().analyze_proprietary("The Meridian account is managed by Dana Reyes.")
print(result.sensitive_words) # ["Meridian", "Dana Reyes"]
TypeScript
const result = await new GuardianLayer().analyzeProprietary(
"The Meridian account is managed by Dana Reyes.",
);
console.log(result.sensitiveWords);

De-identify​

Python
out = GuardianLayer().deidentify_text_outputs(
"The Meridian account is managed by Dana Reyes.",
masking_type="transform",
)
print(out.outputs[0].text)

masking_type picks the style — transform (readable) or redact (*****). See Transform and Masking.

See also​

Supported Entities · Transform