class Google::Apis::LanguageV1beta2::Sentiment

Represents the feeling associated with the entire text or entities in the text. Next ID: 6

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_v1beta2/classes.rb, line 767
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_v1beta2/classes.rb, line 772
def update!(**args)
  @magnitude = args[:magnitude] if args.key?(:magnitude)
  @score = args[:score] if args.key?(:score)
end