Class SyntaxToken

    • 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.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • 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.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)