Class SyntaxToken
- java.lang.Object
-
- software.amazon.awssdk.services.comprehend.model.SyntaxToken
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<SyntaxToken.Builder,SyntaxToken>
@Generated("software.amazon.awssdk:codegen") public final class SyntaxToken extends Object implements SdkPojo, Serializable, ToCopyableBuilder<SyntaxToken.Builder,SyntaxToken>
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.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSyntaxToken.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegerbeginOffset()The zero-based offset from the beginning of the source text to the first character in the word.static SyntaxToken.Builderbuilder()IntegerendOffset()The zero-based offset from the beginning of the source text to the last character in the word.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()PartOfSpeechTagpartOfSpeech()Provides the part of speech label and the confidence level that Amazon Comprehend has that the part of speech was correctly identified.List<SdkField<?>>sdkFields()static Class<? extends SyntaxToken.Builder>serializableBuilderClass()Stringtext()The word that was recognized in the source text.SyntaxToken.BuildertoBuilder()IntegertokenId()A unique identifier for a token.StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
tokenId
public final Integer tokenId()
A unique identifier for a token.
- Returns:
- A unique identifier for a token.
-
text
public final String text()
The word that was recognized in the source text.
- Returns:
- The word that was recognized in the source text.
-
beginOffset
public final Integer beginOffset()
The zero-based offset from the beginning of the source text to the first character in the word.
- Returns:
- The zero-based offset from the beginning of the source text to the first character in the word.
-
endOffset
public final Integer endOffset()
The zero-based offset from the beginning of the source text to the last character in the word.
- Returns:
- The zero-based offset from the beginning of the source text to the last character in the word.
-
partOfSpeech
public final 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.
- Returns:
- 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.
-
toBuilder
public SyntaxToken.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<SyntaxToken.Builder,SyntaxToken>
-
builder
public static SyntaxToken.Builder builder()
-
serializableBuilderClass
public static Class<? extends SyntaxToken.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
-