class Google::Apis::LanguageV1::Sentiment
Represents the feeling associated with the entire text or entities in the text.
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/language_v1/classes.rb, line 745 def initialize(**args) update!(**args) end
Public Instance Methods
update!(**args)
click to toggle source
Update properties of this object
# File lib/google/apis/language_v1/classes.rb, line 750 def update!(**args) @magnitude = args[:magnitude] if args.key?(:magnitude) @score = args[:score] if args.key?(:score) end