tau_eval.models.presidio module

class tau_eval.models.presidio.CategoryAnonymizer[source]

Bases: Operator

Anonymizer which replaces the entity value with the associated category.

REPLACING_FORMAT = '<{entity_type}>'
operate(text: str, params: dict | None = None) str[source]

Anonymize the input text.

operator_name() str[source]

Return operator name.

operator_type() OperatorType[source]

Return operator type.

validate(params: dict | None = None) None[source]

Validate operator parameters.

class tau_eval.models.presidio.CategoryPlaceholder[source]

Bases: Anonymizer

anonymize(text) str[source]
class tau_eval.models.presidio.DeletionAnonymizer[source]

Bases: Operator

Anonymizer which deletes entities.

REPLACING_FORMAT = ''
operate(text: str, params: dict | None = None) str[source]

Anonymize the input text.

operator_name() str[source]

Return operator name.

operator_type() OperatorType[source]

Return operator type.

validate(params: dict | None = None) None[source]

Validate operator parameters.

class tau_eval.models.presidio.EntityDeletion[source]

Bases: Anonymizer

anonymize(text) str[source]
class tau_eval.models.presidio.FakerAnonymizer[source]

Bases: Operator

Anonymizer which replaces the entity value with a Faker-generated fake entity value.

operate(text: str, params: dict | None = None) str[source]

Anonymize the input text with Faker values.

operator_name() str[source]

Return operator name.

operator_type() OperatorType[source]

Return operator type.

validate(params: dict | None = None) None[source]

Validate operator parameters.

class tau_eval.models.presidio.FakerPlaceholder[source]

Bases: Anonymizer

anonymize(text) str[source]
class tau_eval.models.presidio.InstanceCounterAnonymizer[source]

Bases: Operator

Anonymizer which replaces the entity value with an instance counter per entity.

REPLACING_FORMAT = '<{entity_type}_{index}>'
operate(text: str, params: dict | None = None) str[source]

Anonymize the input text.

operator_name() str[source]

Return operator name.

operator_type() OperatorType[source]

Return operator type.

validate(params: dict | None = None) None[source]

Validate operator parameters.

class tau_eval.models.presidio.PlaceholderAnonymizer[source]

Bases: Operator

Anonymizer which replaces the entity value with a <ENTITY> placeholder.

REPLACING_FORMAT = '<ENTITY>'
operate(text: str, params: dict | None = None) str[source]

Anonymize the input text.

operator_name() str[source]

Return operator name.

operator_type() OperatorType[source]

Return operator type.

validate(params: dict | None = None) None[source]

Validate operator parameters.

class tau_eval.models.presidio.UniformPlaceholder[source]

Bases: Anonymizer

anonymize(text) str[source]
class tau_eval.models.presidio.UniquePlaceholderPerEntity[source]

Bases: Anonymizer

anonymize(text) str[source]