Class: Google::Apis::LanguageV1::AnalyzeEntitySentimentResponse

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/language_v1/classes.rb,
lib/google/apis/language_v1/representations.rb,
lib/google/apis/language_v1/representations.rb

Overview

The entity-level sentiment analysis response message.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AnalyzeEntitySentimentResponse

Returns a new instance of AnalyzeEntitySentimentResponse.



118
119
120
# File 'lib/google/apis/language_v1/classes.rb', line 118

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#entitiesArray<Google::Apis::LanguageV1::Entity>

The recognized entities in the input document with associated sentiments. Corresponds to the JSON property entities



109
110
111
# File 'lib/google/apis/language_v1/classes.rb', line 109

def entities
  @entities
end

#languageString

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

Returns:

  • (String)


116
117
118
# File 'lib/google/apis/language_v1/classes.rb', line 116

def language
  @language
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



123
124
125
126
# File 'lib/google/apis/language_v1/classes.rb', line 123

def update!(**args)
  @entities = args[:entities] if args.key?(:entities)
  @language = args[:language] if args.key?(:language)
end