Interface SyntaxToken.Builder

All Superinterfaces:
Buildable, CopyableBuilder<SyntaxToken.Builder,SyntaxToken>, SdkBuilder<SyntaxToken.Builder,SyntaxToken>, SdkPojo
Enclosing class:
SyntaxToken

public static interface SyntaxToken.Builder extends SdkPojo, CopyableBuilder<SyntaxToken.Builder,SyntaxToken>
  • Method Details

    • tokenId

      SyntaxToken.Builder tokenId(Integer tokenId)

      A unique identifier for a token.

      Parameters:
      tokenId - A unique identifier for a token.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • text

      The word that was recognized in the source text.

      Parameters:
      text - The word that was recognized in the source text.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • beginOffset

      SyntaxToken.Builder beginOffset(Integer beginOffset)

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

      Parameters:
      beginOffset - The zero-based offset from the beginning of the source text to the first character in the word.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • endOffset

      SyntaxToken.Builder endOffset(Integer endOffset)

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

      Parameters:
      endOffset - The zero-based offset from the beginning of the source text to the last character in the word.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • partOfSpeech

      SyntaxToken.Builder partOfSpeech(PartOfSpeechTag partOfSpeech)

      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.

      Parameters:
      partOfSpeech - 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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • partOfSpeech

      default SyntaxToken.Builder partOfSpeech(Consumer<PartOfSpeechTag.Builder> partOfSpeech)

      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.

      This is a convenience method that creates an instance of the PartOfSpeechTag.Builder avoiding the need to create one manually via PartOfSpeechTag.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to partOfSpeech(PartOfSpeechTag).

      Parameters:
      partOfSpeech - a consumer that will call methods on PartOfSpeechTag.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: