PiiEntityMask¶
-
class
oci.ai_language.models.
PiiEntityMask
(**kwargs)¶ Bases:
oci.ai_language.models.pii_entity_masking.PiiEntityMasking
Mask PII entities with the given masking character.
Attributes
MODE_MASK
str(object=’’) -> str MODE_REMOVE
str(object=’’) -> str MODE_REPLACE
str(object=’’) -> str exclude
Gets the exclude of this PiiEntityMasking. is_unmasked_from_end
Gets the is_unmasked_from_end of this PiiEntityMask. leave_characters_unmasked
Gets the leave_characters_unmasked of this PiiEntityMask. masking_character
Gets the masking_character of this PiiEntityMask. mode
[Required] Gets the mode of this PiiEntityMasking. should_detect
Gets the should_detect of this PiiEntityMasking. Methods
__init__
(**kwargs)Initializes a new PiiEntityMask 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'¶
-
MODE_REMOVE
= 'REMOVE'¶
-
MODE_REPLACE
= 'REPLACE'¶
-
__init__
(**kwargs)¶ Initializes a new PiiEntityMask object with values from keyword arguments. The default value of the
mode
attribute of this class isMASK
and 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 PiiEntityMask. Allowed values for this property are: “REPLACE”, “MASK”, “REMOVE”
- exclude (list[str]) – The value to assign to the exclude property of this PiiEntityMask.
- should_detect (bool) – The value to assign to the should_detect property of this PiiEntityMask.
- masking_character (str) – The value to assign to the masking_character property of this PiiEntityMask.
- leave_characters_unmasked (int) – The value to assign to the leave_characters_unmasked property of this PiiEntityMask.
- is_unmasked_from_end (bool) – The value to assign to the is_unmasked_from_end property of this PiiEntityMask.
-
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.
-
is_unmasked_from_end
¶ Gets the is_unmasked_from_end of this PiiEntityMask. Unmask from the end. By default, the whole entity is masked. This field works in concert with leaveCharactersUnmasked. For example, leaveCharactersUnmasked is 3 and isUnmaskedFromEnd is true, then if the entity is India the masked entity/result is **dia.
Returns: The is_unmasked_from_end of this PiiEntityMask. Return type: bool
-
leave_characters_unmasked
¶ Gets the leave_characters_unmasked of this PiiEntityMask. Number of characters to leave unmasked. By default, the whole entity is masked.
Returns: The leave_characters_unmasked of this PiiEntityMask. Return type: int
-
masking_character
¶ Gets the masking_character of this PiiEntityMask. Masking character. By default, the character is an asterisk (*)
Returns: The masking_character of this PiiEntityMask. Return type: str
-
mode
¶ [Required] Gets the mode of this PiiEntityMasking. The type of masking mode.
Allowed values for this property are: “REPLACE”, “MASK”, “REMOVE”
Returns: The mode of this PiiEntityMasking. Return type: str
-
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
-