Entity

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

Bases: object

An entity allows the labeler to identify an object in the record to label. This can be, for example, a snippet of text, an entire image, or a bounding box within an image. All entity types have an array of labels that are indexed. If more than one label is provided, but the annotationType on the corresponding dataset is for a single class, the API rejects the create annotation request.

Attributes

ENTITY_TYPE_GENERIC A constant which can be used with the entity_type property of a Entity.
ENTITY_TYPE_IMAGEOBJECTSELECTION A constant which can be used with the entity_type property of a Entity.
ENTITY_TYPE_KEYVALUESELECTION A constant which can be used with the entity_type property of a Entity.
ENTITY_TYPE_TEXTSELECTION A constant which can be used with the entity_type property of a Entity.
entity_type [Required] Gets the entity_type of this Entity.

Methods

__init__(**kwargs) Initializes a new Entity 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.
ENTITY_TYPE_GENERIC = 'GENERIC'

A constant which can be used with the entity_type property of a Entity. This constant has a value of “GENERIC”

ENTITY_TYPE_IMAGEOBJECTSELECTION = 'IMAGEOBJECTSELECTION'

A constant which can be used with the entity_type property of a Entity. This constant has a value of “IMAGEOBJECTSELECTION”

ENTITY_TYPE_KEYVALUESELECTION = 'KEYVALUESELECTION'

A constant which can be used with the entity_type property of a Entity. This constant has a value of “KEYVALUESELECTION”

ENTITY_TYPE_TEXTSELECTION = 'TEXTSELECTION'

A constant which can be used with the entity_type property of a Entity. This constant has a value of “TEXTSELECTION”

__init__(**kwargs)

Initializes a new Entity object with values from keyword arguments. This class has the following subclasses and if you are using this class as input to a service operations then you should favor using a subclass over the base class:

The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:entity_type (str) – The value to assign to the entity_type property of this Entity. Allowed values for this property are: “GENERIC”, “IMAGEOBJECTSELECTION”, “TEXTSELECTION”, “KEYVALUESELECTION”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
entity_type

[Required] Gets the entity_type of this Entity. The entity type described in the annotation. GENERIC - An extensible entity type that is the base entity type for some annotation formats. IMAGEOBJECTSELECTION- - This allows the labeler to use specify a bounding polygon on the image to represent an object and apply labels to it. TEXTSELECTION - This allows the labeler to highlight text, by specifying an offset and a length, and apply labels to it. KEYVALUESELECTION - This allows the labeler to apply label the highlighted text from OCR.

Allowed values for this property are: “GENERIC”, “IMAGEOBJECTSELECTION”, “TEXTSELECTION”, “KEYVALUESELECTION”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The entity_type of this Entity.
Return type: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.