class Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult

Represents the result of sentiment analysis.

Attributes

magnitude[RW]

A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative). Corresponds to the JSON property `magnitude` @return [Float]

score[RW]

Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). Corresponds to the JSON property `score` @return [Float]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/dialogflow_v2beta1/classes.rb, line 2479
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/dialogflow_v2beta1/classes.rb, line 2484
def update!(**args)
  @magnitude = args[:magnitude] if args.key?(:magnitude)
  @score = args[:score] if args.key?(:score)
end