Interface SyntaxToken.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<SyntaxToken.Builder,
,SyntaxToken> SdkBuilder<SyntaxToken.Builder,
,SyntaxToken> SdkPojo
- Enclosing class:
SyntaxToken
-
Method Summary
Modifier and TypeMethodDescriptionbeginOffset
(Integer beginOffset) The zero-based offset from the beginning of the source text to the first character in the word.The zero-based offset from the beginning of the source text to the last character in the word.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.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.The word that was recognized in the source text.A unique identifier for a token.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
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
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
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
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
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 thePartOfSpeechTag.Builder
avoiding the need to create one manually viaPartOfSpeechTag.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed topartOfSpeech(PartOfSpeechTag)
.- Parameters:
partOfSpeech
- a consumer that will call methods onPartOfSpeechTag.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-