You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::Comprehend::Types::SyntaxToken

Inherits:
Struct
  • Object
show all
Defined in:
(unknown)

Overview

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.

Instance Attribute Summary collapse

Instance Attribute Details

#begin_offsetInteger

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

Returns:

  • (Integer)

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

#end_offsetInteger

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

Returns:

  • (Integer)

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

#part_of_speechTypes::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 how-syntax.

Returns:

  • (Types::PartOfSpeechTag)

    Provides the part of speech label and the confidence level that Amazon Comprehend has that the part of speech was correctly identified.

#textString

The word that was recognized in the source text.

Returns:

  • (String)

    The word that was recognized in the source text.

#token_idInteger

A unique identifier for a token.

Returns:

  • (Integer)

    A unique identifier for a token.