Reference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class SentimentAnalysisResult.
The result of sentiment analysis. Sentiment analysis inspects user input
and identifies the prevailing subjective opinion, especially to determine a
user's attitude as positive, negative, or neutral.
Generated from protobuf messagegoogle.cloud.dialogflow.cx.v3.SentimentAnalysisResult
Namespace
Google \ Cloud \ Dialogflow \ Cx \ V3
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ score
float
Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
↳ magnitude
float
A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative).
getScore
Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
sentiment).
Returns
Type
Description
float
setScore
Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
sentiment).
Parameter
Name
Description
var
float
Returns
Type
Description
$this
getMagnitude
A non-negative number in the [0, +inf) range, which represents the absolute
magnitude of sentiment, regardless of score (positive or negative).
Returns
Type
Description
float
setMagnitude
A non-negative number in the [0, +inf) range, which represents the absolute
magnitude of sentiment, regardless of score (positive or negative).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Dialogflow Cx V3 Client - Class SentimentAnalysisResult (0.8.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.8.1 (latest)](/php/docs/reference/cloud-dialogflow-cx/latest/V3.SentimentAnalysisResult)\n- [0.8.0](/php/docs/reference/cloud-dialogflow-cx/0.8.0/V3.SentimentAnalysisResult)\n- [0.7.2](/php/docs/reference/cloud-dialogflow-cx/0.7.2/V3.SentimentAnalysisResult)\n- [0.6.0](/php/docs/reference/cloud-dialogflow-cx/0.6.0/V3.SentimentAnalysisResult)\n- [0.5.2](/php/docs/reference/cloud-dialogflow-cx/0.5.2/V3.SentimentAnalysisResult)\n- [0.4.1](/php/docs/reference/cloud-dialogflow-cx/0.4.1/V3.SentimentAnalysisResult)\n- [0.3.4](/php/docs/reference/cloud-dialogflow-cx/0.3.4/V3.SentimentAnalysisResult)\n- [0.2.1](/php/docs/reference/cloud-dialogflow-cx/0.2.1/V3.SentimentAnalysisResult)\n- [0.1.1](/php/docs/reference/cloud-dialogflow-cx/0.1.1/V3.SentimentAnalysisResult) \nReference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class SentimentAnalysisResult.\n\nThe result of sentiment analysis. Sentiment analysis inspects user input\nand identifies the prevailing subjective opinion, especially to determine a\nuser's attitude as positive, negative, or neutral.\n\nGenerated from protobuf message `google.cloud.dialogflow.cx.v3.SentimentAnalysisResult`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dialogflow \\\\ Cx \\\\ V3\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getScore\n\nSentiment score between -1.0 (negative sentiment) and 1.0 (positive\nsentiment).\n\n### setScore\n\nSentiment score between -1.0 (negative sentiment) and 1.0 (positive\nsentiment).\n\n### getMagnitude\n\nA non-negative number in the \\[0, +inf) range, which represents the absolute\nmagnitude of sentiment, regardless of score (positive or negative).\n\n### setMagnitude\n\nA non-negative number in the \\[0, +inf) range, which represents the absolute\nmagnitude of sentiment, regardless of score (positive or negative)."]]