Entity¶
-
class
oci.ai_language.models.Entity(**kwargs)¶ Bases:
objectentity object
Methods
__init__(**kwargs)Initializes a new Entity object with values from keyword arguments. Attributes
is_piiGets the is_pii of this Entity. lengthGets the length of this Entity. offsetGets the offset of this Entity. scoreGets the score of this Entity. textGets the text of this Entity. typeGets the type of this Entity. -
__init__(**kwargs)¶ Initializes a new Entity object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):
Parameters: - offset (int) – The value to assign to the offset property of this Entity.
- length (int) – The value to assign to the length property of this Entity.
- text (str) – The value to assign to the text property of this Entity.
- type (str) – The value to assign to the type property of this Entity.
- is_pii (bool) – The value to assign to the is_pii property of this Entity.
- score (float) – The value to assign to the score property of this Entity.
-
is_pii¶ Gets the is_pii of this Entity. This flag is to indicate if it is PII entity or not.
Returns: The is_pii of this Entity. Return type: bool
-
length¶ Gets the length of this Entity. Length of entity text
Returns: The length of this Entity. Return type: int
-
offset¶ Gets the offset of this Entity. The number of Unicode code points preceding this entity in the submitted text.
Returns: The offset of this Entity. Return type: int
-
score¶ Gets the score of this Entity. Score or confidence of extracted entity type. Example: 0.9999856066867399
Returns: The score of this Entity. Return type: float
-
text¶ Gets the text of this Entity. Entity text like name of person, location, and so on.
Returns: The text of this Entity. Return type: str
-
type¶ Gets the type of this Entity. Type of entity text like PER, LOC, GPE and NOPE.
Returns: The type of this Entity. Return type: str
-