pii.algorithm#
Module Contents#
Classes#
API#
- class pii.algorithm.PiiDeidentifier(
- language: str = DEFAULT_LANGUAGE,
- supported_entities: list[str] | None = None,
- anonymize_action: str = 'replace',
- **kwargs,
Initialization
- add_custom_operator(
- entity: str,
- operator: presidio_anonymizer.entities.OperatorConfig,
- add_custom_recognizer(
- recognizer: presidio_analyzer.EntityRecognizer,
- analyze_text(
- text: str,
- entities: list[str] | None = None,
- language: str = 'en',
- analyze_text_batch(
- texts: list[str],
- entities: list[str] | None = None,
- language: str = 'en',
- batch_size: int = 32,
- deidentify_text(text: str) str#
- deidentify_text_batch(
- texts: list[str],
- batch_size: int = 32,
- static from_config(
- config: collections.abc.Mapping[str, Any],
- static from_default_config() pii.algorithm.PiiDeidentifier#
- static from_yaml_file(
- path: pathlib.Path | str,
- list_operators() dict[str, presidio_anonymizer.entities.OperatorConfig]#
- list_supported_entities() list[str]#