anonymizer.anonymize()
The primary method on anAnonymizer instance.
Signature
Parameters
The text to anonymize
Locale hint (e.g.,
'de-DE', 'en-US'). Helps with semantic enrichment.Policy override for this call. Merged with default policy.
Returns
Example
anonymize()
Standalone function for one-off anonymization (regex-only by default).Signature
Example
Creates a temporary anonymizer for each call. For multiple texts, use
createAnonymizer() instead.anonymizeRegexOnly()
Fast regex-only anonymization without NER.Signature
Example
Performance
anonymizeWithNER()
One-off anonymization with NER model.Signature
Example
Policy Overrides
Override default policy for specific calls:Handling Results
Access Anonymized Text
Check Detection Stats
Validate Output
Related
- createAnonymizer - Create an anonymizer instance
- rehydrate - Restore original values
- Sessions - Session-based anonymization