Configuration
Worka PII separates detection policy from anonymization policy.
PolicyConfig
PolicyConfig controls how recognizers are scored and how overlaps are resolved. It is designed to be explicit and stable across releases. When you need strict thresholds or custom resolution rules, start here.
AnonymizeConfig
AnonymizeConfig maps entity types to operators. Operators include:
Redactfor full removal.Maskfor partial masking.Replacefor fixed or templated values.Hashfor deterministic hashing.
Operators can be assigned per entity type so Email and Phone can be handled differently.
let mut config = AnonymizeConfig::default();
config.per_entity.insert(
"Email".to_string(),
Operator::Replace { with: "<EMAIL>".into() },
);