HierarchicalEntity

class oci.ai_language.models.HierarchicalEntity(**kwargs)

Bases: object

Hierarchical entity object

Methods

__init__(**kwargs) Initializes a new HierarchicalEntity object with values from keyword arguments.

Attributes

length Gets the length of this HierarchicalEntity.
offset Gets the offset of this HierarchicalEntity.
score Gets the score of this HierarchicalEntity.
sub_type Gets the sub_type of this HierarchicalEntity.
text Gets the text of this HierarchicalEntity.
type Gets the type of this HierarchicalEntity.
__init__(**kwargs)

Initializes a new HierarchicalEntity 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 HierarchicalEntity.
  • length (int) – The value to assign to the length property of this HierarchicalEntity.
  • text (str) – The value to assign to the text property of this HierarchicalEntity.
  • type (str) – The value to assign to the type property of this HierarchicalEntity.
  • sub_type (str) – The value to assign to the sub_type property of this HierarchicalEntity.
  • score (float) – The value to assign to the score property of this HierarchicalEntity.
length

Gets the length of this HierarchicalEntity. Length of entity text

Returns:The length of this HierarchicalEntity.
Return type:int
offset

Gets the offset of this HierarchicalEntity. The number of Unicode code points preceding this entity in the submitted text.

Returns:The offset of this HierarchicalEntity.
Return type:int
score

Gets the score of this HierarchicalEntity. Score or confidence for detected entity.

Returns:The score of this HierarchicalEntity.
Return type:float
sub_type

Gets the sub_type of this HierarchicalEntity. Sub-type of entity text like GPE for LOCATION type

Returns:The sub_type of this HierarchicalEntity.
Return type:str
text

Gets the text of this HierarchicalEntity. Entity text like name of person, location, and so on.

Returns:The text of this HierarchicalEntity.
Return type:str
type

Gets the type of this HierarchicalEntity. Type of entity text like PER, LOC.

Returns:The type of this HierarchicalEntity.
Return type:str