Detection vs De-identification
| Detection | De-identification | |
|---|---|---|
| Method | analyze_proprietary() | deidentify_text_outputs() |
| Changes the text? | No — lists what's sensitive | Yes — returns safer text |
| Use it to | Review or audit before changing anything | Produce 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.