Struct aws_sdk_comprehend::types::Entity
source · #[non_exhaustive]pub struct Entity {
pub score: Option<f32>,
pub type: Option<EntityType>,
pub text: Option<String>,
pub begin_offset: Option<i32>,
pub end_offset: Option<i32>,
pub block_references: Option<Vec<BlockReference>>,
}
Expand description
Provides information about an entity.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.score: Option<f32>
The level of confidence that Amazon Comprehend has in the accuracy of the detection.
type: Option<EntityType>
The entity type. For entity detection using the built-in model, this field contains one of the standard entity types listed below.
For custom entity detection, this field contains one of the entity types that you specified when you trained your custom model.
text: Option<String>
The text of the entity.
begin_offset: Option<i32>
The zero-based offset from the beginning of the source text to the first character in the entity.
This field is empty for non-text input.
end_offset: Option<i32>
The zero-based offset from the beginning of the source text to the last character in the entity.
This field is empty for non-text input.
block_references: Option<Vec<BlockReference>>
A reference to each block for this entity. This field is empty for plain-text input.
Implementations§
source§impl Entity
impl Entity
sourcepub fn score(&self) -> Option<f32>
pub fn score(&self) -> Option<f32>
The level of confidence that Amazon Comprehend has in the accuracy of the detection.
sourcepub fn type(&self) -> Option<&EntityType>
pub fn type(&self) -> Option<&EntityType>
The entity type. For entity detection using the built-in model, this field contains one of the standard entity types listed below.
For custom entity detection, this field contains one of the entity types that you specified when you trained your custom model.
sourcepub fn begin_offset(&self) -> Option<i32>
pub fn begin_offset(&self) -> Option<i32>
The zero-based offset from the beginning of the source text to the first character in the entity.
This field is empty for non-text input.
sourcepub fn end_offset(&self) -> Option<i32>
pub fn end_offset(&self) -> Option<i32>
The zero-based offset from the beginning of the source text to the last character in the entity.
This field is empty for non-text input.
sourcepub fn block_references(&self) -> &[BlockReference]
pub fn block_references(&self) -> &[BlockReference]
A reference to each block for this entity. This field is empty for plain-text input.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .block_references.is_none()
.