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

Information about one mention of an entity. The mention information includes * the location of the mention in the text and the sentiment of the mention.

*

For more information about targeted sentiment, see Targeted * sentiment.

See Also:

AWS * API Reference

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

Model confidence that the entity is relevant. Value range is zero to one, * where one is highest confidence.

*/ inline double GetScore() const{ return m_score; } /** *

Model confidence that the entity is relevant. Value range is zero to one, * where one is highest confidence.

*/ inline bool ScoreHasBeenSet() const { return m_scoreHasBeenSet; } /** *

Model confidence that the entity is relevant. Value range is zero to one, * where one is highest confidence.

*/ inline void SetScore(double value) { m_scoreHasBeenSet = true; m_score = value; } /** *

Model confidence that the entity is relevant. Value range is zero to one, * where one is highest confidence.

*/ inline TargetedSentimentMention& WithScore(double value) { SetScore(value); return *this;} /** *

The confidence that all the entities mentioned in the group relate to the * same entity.

*/ inline double GetGroupScore() const{ return m_groupScore; } /** *

The confidence that all the entities mentioned in the group relate to the * same entity.

*/ inline bool GroupScoreHasBeenSet() const { return m_groupScoreHasBeenSet; } /** *

The confidence that all the entities mentioned in the group relate to the * same entity.

*/ inline void SetGroupScore(double value) { m_groupScoreHasBeenSet = true; m_groupScore = value; } /** *

The confidence that all the entities mentioned in the group relate to the * same entity.

*/ inline TargetedSentimentMention& WithGroupScore(double value) { SetGroupScore(value); return *this;} /** *

The text in the document that identifies the entity.

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

The text in the document that identifies the entity.

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

The text in the document that identifies the entity.

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

The text in the document that identifies the entity.

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

The text in the document that identifies the entity.

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

The text in the document that identifies the entity.

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

The text in the document that identifies the entity.

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

The text in the document that identifies the entity.

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

The type of the entity. Amazon Comprehend supports a variety of entity * types.

*/ inline const TargetedSentimentEntityType& GetType() const{ return m_type; } /** *

The type of the entity. Amazon Comprehend supports a variety of entity * types.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of the entity. Amazon Comprehend supports a variety of entity * types.

*/ inline void SetType(const TargetedSentimentEntityType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of the entity. Amazon Comprehend supports a variety of entity * types.

*/ inline void SetType(TargetedSentimentEntityType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of the entity. Amazon Comprehend supports a variety of entity * types.

*/ inline TargetedSentimentMention& WithType(const TargetedSentimentEntityType& value) { SetType(value); return *this;} /** *

The type of the entity. Amazon Comprehend supports a variety of entity * types.

*/ inline TargetedSentimentMention& WithType(TargetedSentimentEntityType&& value) { SetType(std::move(value)); return *this;} /** *

Contains the sentiment and sentiment score for the mention.

*/ inline const MentionSentiment& GetMentionSentiment() const{ return m_mentionSentiment; } /** *

Contains the sentiment and sentiment score for the mention.

*/ inline bool MentionSentimentHasBeenSet() const { return m_mentionSentimentHasBeenSet; } /** *

Contains the sentiment and sentiment score for the mention.

*/ inline void SetMentionSentiment(const MentionSentiment& value) { m_mentionSentimentHasBeenSet = true; m_mentionSentiment = value; } /** *

Contains the sentiment and sentiment score for the mention.

*/ inline void SetMentionSentiment(MentionSentiment&& value) { m_mentionSentimentHasBeenSet = true; m_mentionSentiment = std::move(value); } /** *

Contains the sentiment and sentiment score for the mention.

*/ inline TargetedSentimentMention& WithMentionSentiment(const MentionSentiment& value) { SetMentionSentiment(value); return *this;} /** *

Contains the sentiment and sentiment score for the mention.

*/ inline TargetedSentimentMention& WithMentionSentiment(MentionSentiment&& value) { SetMentionSentiment(std::move(value)); return *this;} /** *

The offset into the document text where the mention begins.

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

The offset into the document text where the mention begins.

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

The offset into the document text where the mention begins.

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

The offset into the document text where the mention begins.

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

The offset into the document text where the mention ends.

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

The offset into the document text where the mention ends.

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

The offset into the document text where the mention ends.

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

The offset into the document text where the mention ends.

*/ inline TargetedSentimentMention& WithEndOffset(int value) { SetEndOffset(value); return *this;} private: double m_score; bool m_scoreHasBeenSet = false; double m_groupScore; bool m_groupScoreHasBeenSet = false; Aws::String m_text; bool m_textHasBeenSet = false; TargetedSentimentEntityType m_type; bool m_typeHasBeenSet = false; MentionSentiment m_mentionSentiment; bool m_mentionSentimentHasBeenSet = false; int m_beginOffset; bool m_beginOffsetHasBeenSet = false; int m_endOffset; bool m_endOffsetHasBeenSet = false; }; } // namespace Model } // namespace Comprehend } // namespace Aws