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

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

Overview

The entity-level sentiment analysis response message.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ AnalyzeEntitySentimentResponse


120
121
122
# File 'generated/google/apis/language_v1/classes.rb', line 120

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


111
112
113
# File 'generated/google/apis/language_v1/classes.rb', line 111

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


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

def language
  @language
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


125
126
127
128
# File 'generated/google/apis/language_v1/classes.rb', line 125

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