TextSelectionEntity¶
-
class
oci.data_labeling_service_dataplane.models.
TextSelectionEntity
(**kwargs)¶ Bases:
oci.data_labeling_service_dataplane.models.entity.Entity
This lets the labeler highlight text, by specifying an offset and a length, and apply labels to it.
Attributes
ENTITY_TYPE_GENERIC
str(object=’’) -> str ENTITY_TYPE_IMAGEOBJECTSELECTION
str(object=’’) -> str ENTITY_TYPE_KEYVALUESELECTION
str(object=’’) -> str ENTITY_TYPE_TEXTSELECTION
str(object=’’) -> str entity_type
[Required] Gets the entity_type of this Entity. extended_metadata
Gets the extended_metadata of this TextSelectionEntity. labels
[Required] Gets the labels of this TextSelectionEntity. text_span
[Required] Gets the text_span of this TextSelectionEntity. Methods
__init__
(**kwargs)Initializes a new TextSelectionEntity 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'¶
-
ENTITY_TYPE_IMAGEOBJECTSELECTION
= 'IMAGEOBJECTSELECTION'¶
-
ENTITY_TYPE_KEYVALUESELECTION
= 'KEYVALUESELECTION'¶
-
ENTITY_TYPE_TEXTSELECTION
= 'TEXTSELECTION'¶
-
__init__
(**kwargs)¶ Initializes a new TextSelectionEntity object with values from keyword arguments. The default value of the
entity_type
attribute of this class isTEXTSELECTION
and it should not be changed. 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 TextSelectionEntity. Allowed values for this property are: “GENERIC”, “IMAGEOBJECTSELECTION”, “TEXTSELECTION”, “KEYVALUESELECTION”
- labels (list[oci.data_labeling_service_dataplane.models.Label]) – The value to assign to the labels property of this TextSelectionEntity.
- text_span (oci.data_labeling_service_dataplane.models.TextSpan) – The value to assign to the text_span property of this TextSelectionEntity.
- extended_metadata (dict(str, str)) – The value to assign to the extended_metadata property of this TextSelectionEntity.
-
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
-
extended_metadata
¶ Gets the extended_metadata of this TextSelectionEntity. A simple key-value pair that is applied without any predefined name, type, or scope. It exists for cross-compatibility only. For example: {“bar-key”: “value”}
Returns: The extended_metadata of this TextSelectionEntity. Return type: dict(str, 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.
-
labels
¶ [Required] Gets the labels of this TextSelectionEntity. A collection of label entities.
Returns: The labels of this TextSelectionEntity. Return type: list[oci.data_labeling_service_dataplane.models.Label]
-
text_span
¶ [Required] Gets the text_span of this TextSelectionEntity.
Returns: The text_span of this TextSelectionEntity. Return type: oci.data_labeling_service_dataplane.models.TextSpan
-