PiiEntityReplace¶
- class oci.ai_language.models.PiiEntityReplace(**kwargs)¶
Bases:
PiiEntityMaskingReplace PII entities with a given sequence of characters.
Attributes:
A constant which can be used with the mode property of a PiiEntityMasking.
A constant which can be used with the mode property of a PiiEntityMasking.
A constant which can be used with the mode property of a PiiEntityMasking.
A constant which can be used with the mode property of a PiiEntityMasking.
Gets the exclude of this PiiEntityMasking.
[Required] Gets the mode of this PiiEntityMasking.
Gets the replace_with of this PiiEntityReplace.
Gets the should_detect of this PiiEntityMasking.
Methods:
__init__(**kwargs)Initializes a new PiiEntityReplace object with values from keyword arguments.
get_subtype(object_dictionary)Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
- MODE_MASK = 'MASK'¶
A constant which can be used with the mode property of a PiiEntityMasking. This constant has a value of “MASK”
- MODE_RELEXIFY = 'RELEXIFY'¶
A constant which can be used with the mode property of a PiiEntityMasking. This constant has a value of “RELEXIFY”
- MODE_REMOVE = 'REMOVE'¶
A constant which can be used with the mode property of a PiiEntityMasking. This constant has a value of “REMOVE”
- MODE_REPLACE = 'REPLACE'¶
A constant which can be used with the mode property of a PiiEntityMasking. This constant has a value of “REPLACE”
- __init__(**kwargs)¶
Initializes a new PiiEntityReplace object with values from keyword arguments. The default value of the
modeattribute of this class isREPLACEand it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):- Parameters
mode (str) – The value to assign to the mode property of this PiiEntityReplace. Allowed values for this property are: “REPLACE”, “MASK”, “REMOVE”, “RELEXIFY”
exclude (list[str]) – The value to assign to the exclude property of this PiiEntityReplace.
should_detect (bool) – The value to assign to the should_detect property of this PiiEntityReplace.
replace_with (str) – The value to assign to the replace_with property of this PiiEntityReplace.
- property exclude¶
Gets the exclude of this PiiEntityMasking. List of offsets/entities to be removed from anonymization.
- Returns
The exclude of this PiiEntityMasking.
- Return type
list[str]
- static get_subtype(object_dictionary)¶
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
- property mode¶
[Required] Gets the mode of this PiiEntityMasking. The type of masking mode.
Allowed values for this property are: “REPLACE”, “MASK”, “REMOVE”, “RELEXIFY”
- Returns
The mode of this PiiEntityMasking.
- Return type
str
- property replace_with¶
Gets the replace_with of this PiiEntityReplace. Replace entities with given sequence of characters. By default PII entity will be replaced with <ENTITY_TYPE>.
- Returns
The replace_with of this PiiEntityReplace.
- Return type
str
- property should_detect¶
Gets the should_detect of this PiiEntityMasking. To include excluded entities from masking in detected entities or not.
- Returns
The should_detect of this PiiEntityMasking.
- Return type
bool