Skip to content

SyntaxToken

Source code in docs_src/capo_comprehend/types/syntax_token.py
class SyntaxToken(TypedDict, closed=True):
    token_id: NotRequired["capo_comprehend.types.integer.Integer"]
    """<p>A unique identifier for a token.</p>"""
    text: NotRequired["capo_comprehend.types.string.String"]
    """<p>The word that was recognized in the source text.</p>"""
    begin_offset: NotRequired["capo_comprehend.types.integer.Integer"]
    """<p>The zero-based offset from the beginning of the source text to the first character in the word.</p>"""
    end_offset: NotRequired["capo_comprehend.types.integer.Integer"]
    """<p>The zero-based offset from the beginning of the source text to the last character in the word.</p>"""
    part_of_speech: NotRequired[
        "capo_comprehend.types.part_of_speech_tag.PartOfSpeechTag"
    ]
    """<p>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 <a href="https://docs.aws.amazon.com/comprehend/latest/dg/how-syntax.html">Syntax</a> in the Comprehend Developer Guide. </p>"""

begin_offset instance-attribute

begin_offset: NotRequired[Integer]

The zero-based offset from the beginning of the source text to the first character in the word.

end_offset instance-attribute

end_offset: NotRequired[Integer]

The zero-based offset from the beginning of the source text to the last character in the word.

part_of_speech instance-attribute

part_of_speech: NotRequired[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.

text instance-attribute

text: NotRequired[String]

The word that was recognized in the source text.

token_id instance-attribute

token_id: NotRequired[Integer]

A unique identifier for a token.