/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Comprehend { namespace Model { /** *

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:

AWS * API Reference

*/ class SyntaxToken { public: AWS_COMPREHEND_API SyntaxToken(); AWS_COMPREHEND_API SyntaxToken(Aws::Utils::Json::JsonView jsonValue); AWS_COMPREHEND_API SyntaxToken& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_COMPREHEND_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

A unique identifier for a token.

*/ inline int GetTokenId() const{ return m_tokenId; } /** *

A unique identifier for a token.

*/ inline bool TokenIdHasBeenSet() const { return m_tokenIdHasBeenSet; } /** *

A unique identifier for a token.

*/ inline void SetTokenId(int value) { m_tokenIdHasBeenSet = true; m_tokenId = value; } /** *

A unique identifier for a token.

*/ inline SyntaxToken& WithTokenId(int value) { SetTokenId(value); return *this;} /** *

The word that was recognized in the source text.

*/ inline const Aws::String& GetText() const{ return m_text; } /** *

The word that was recognized in the source text.

*/ inline bool TextHasBeenSet() const { return m_textHasBeenSet; } /** *

The word that was recognized in the source text.

*/ inline void SetText(const Aws::String& value) { m_textHasBeenSet = true; m_text = value; } /** *

The word that was recognized in the source text.

*/ inline void SetText(Aws::String&& value) { m_textHasBeenSet = true; m_text = std::move(value); } /** *

The word that was recognized in the source text.

*/ inline void SetText(const char* value) { m_textHasBeenSet = true; m_text.assign(value); } /** *

The word that was recognized in the source text.

*/ inline SyntaxToken& WithText(const Aws::String& value) { SetText(value); return *this;} /** *

The word that was recognized in the source text.

*/ inline SyntaxToken& WithText(Aws::String&& value) { SetText(std::move(value)); return *this;} /** *

The word that was recognized in the source text.

*/ inline SyntaxToken& WithText(const char* value) { SetText(value); return *this;} /** *

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

*/ inline int GetBeginOffset() const{ return m_beginOffset; } /** *

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

*/ inline bool BeginOffsetHasBeenSet() const { return m_beginOffsetHasBeenSet; } /** *

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

*/ inline void SetBeginOffset(int value) { m_beginOffsetHasBeenSet = true; m_beginOffset = value; } /** *

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

*/ inline SyntaxToken& WithBeginOffset(int value) { SetBeginOffset(value); return *this;} /** *

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

*/ inline int GetEndOffset() const{ return m_endOffset; } /** *

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

*/ inline bool EndOffsetHasBeenSet() const { return m_endOffsetHasBeenSet; } /** *

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

*/ inline void SetEndOffset(int value) { m_endOffsetHasBeenSet = true; m_endOffset = value; } /** *

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

*/ inline SyntaxToken& WithEndOffset(int value) { SetEndOffset(value); return *this;} /** *

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.

*/ inline const PartOfSpeechTag& GetPartOfSpeech() const{ return m_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.

*/ inline bool PartOfSpeechHasBeenSet() const { return m_partOfSpeechHasBeenSet; } /** *

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.

*/ inline void SetPartOfSpeech(const PartOfSpeechTag& value) { m_partOfSpeechHasBeenSet = true; m_partOfSpeech = value; } /** *

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.

*/ inline void SetPartOfSpeech(PartOfSpeechTag&& value) { m_partOfSpeechHasBeenSet = true; m_partOfSpeech = std::move(value); } /** *

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.

*/ inline SyntaxToken& WithPartOfSpeech(const PartOfSpeechTag& value) { SetPartOfSpeech(value); return *this;} /** *

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.

*/ inline SyntaxToken& WithPartOfSpeech(PartOfSpeechTag&& value) { SetPartOfSpeech(std::move(value)); return *this;} private: int m_tokenId; bool m_tokenIdHasBeenSet = false; Aws::String m_text; bool m_textHasBeenSet = false; int m_beginOffset; bool m_beginOffsetHasBeenSet = false; int m_endOffset; bool m_endOffsetHasBeenSet = false; PartOfSpeechTag m_partOfSpeech; bool m_partOfSpeechHasBeenSet = false; }; } // namespace Model } // namespace Comprehend } // namespace Aws