Entity

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

Bases: object

entity object

Methods:

__init__(**kwargs)

Initializes a new Entity object with values from keyword arguments.

Attributes:

is_pii

Gets the is_pii of this Entity.

length

Gets the length of this Entity.

offset

Gets the offset of this Entity.

score

Gets the score of this Entity.

text

Gets the text of this Entity.

type

Gets 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.

property 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

property length

Gets the length of this Entity. Length of entity text

Returns

The length of this Entity.

Return type

int

property 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

property 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

property 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

property 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