class Google::Apis::LanguageV1beta2::AnalyzeSentimentResponse

The sentiment analysis response message.

Attributes

document_sentiment[RW]

Represents the feeling associated with the entire text or entities in the text. Next ID: 6 Corresponds to the JSON property `documentSentiment` @return [Google::Apis::LanguageV1beta2::Sentiment]

language[RW]

The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details. Corresponds to the JSON property `language` @return [String]

sentences[RW]

The sentiment for all the sentences in the document. Corresponds to the JSON property `sentences` @return [Array<Google::Apis::LanguageV1beta2::Sentence>]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/language_v1beta2/classes.rb, line 180
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 185
def update!(**args)
  @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
  @language = args[:language] if args.key?(:language)
  @sentences = args[:sentences] if args.key?(:sentences)
end