Struct aws_sdk_comprehend::types::SyntaxToken
source · #[non_exhaustive]pub struct SyntaxToken {
pub token_id: Option<i32>,
pub text: Option<String>,
pub begin_offset: Option<i32>,
pub end_offset: Option<i32>,
pub part_of_speech: Option<PartOfSpeechTag>,
}
Expand description
Represents a work in the input text that was recognized and assigned a part of speech. There is one syntax token record for each word in the source text.
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.token_id: Option<i32>
A unique identifier for a token.
text: Option<String>
The word that was recognized in the source text.
begin_offset: Option<i32>
The zero-based offset from the beginning of the source text to the first character in the word.
end_offset: Option<i32>
The zero-based offset from the beginning of the source text to the last character in the word.
part_of_speech: Option<PartOfSpeechTag>
Provides the part of speech label and the confidence level that Amazon Comprehend has that the part of speech was correctly identified. For more information, see Syntax in the Comprehend Developer Guide.
Implementations§
source§impl SyntaxToken
impl SyntaxToken
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 word.
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 word.
sourcepub fn part_of_speech(&self) -> Option<&PartOfSpeechTag>
pub fn part_of_speech(&self) -> Option<&PartOfSpeechTag>
Provides the part of speech label and the confidence level that Amazon Comprehend has that the part of speech was correctly identified. For more information, see Syntax in the Comprehend Developer Guide.
source§impl SyntaxToken
impl SyntaxToken
sourcepub fn builder() -> SyntaxTokenBuilder
pub fn builder() -> SyntaxTokenBuilder
Creates a new builder-style object to manufacture SyntaxToken
.
Trait Implementations§
source§impl Clone for SyntaxToken
impl Clone for SyntaxToken
source§fn clone(&self) -> SyntaxToken
fn clone(&self) -> SyntaxToken
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SyntaxToken
impl Debug for SyntaxToken
source§impl PartialEq for SyntaxToken
impl PartialEq for SyntaxToken
source§fn eq(&self, other: &SyntaxToken) -> bool
fn eq(&self, other: &SyntaxToken) -> bool
self
and other
values to be equal, and is used
by ==
.