Class: Google::Apis::LanguageV1beta2::AnalyzeSentimentResponse
- Inherits:
- 
      Object
      
        - Object
- Google::Apis::LanguageV1beta2::AnalyzeSentimentResponse
 
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/language_v1beta2/classes.rb,
 generated/google/apis/language_v1beta2/representations.rb,
 generated/google/apis/language_v1beta2/representations.rb
Overview
The sentiment analysis response message.
Instance Attribute Summary collapse
- 
  
    
      #document_sentiment  ⇒ Google::Apis::LanguageV1beta2::Sentiment 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Represents the feeling associated with the entire text or entities in the text. 
- 
  
    
      #language  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    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. 
- 
  
    
      #sentences  ⇒ Array<Google::Apis::LanguageV1beta2::Sentence> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The sentiment for all the sentences in the document. 
Instance Method Summary collapse
- 
  
    
      #initialize(**args)  ⇒ AnalyzeSentimentResponse 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of AnalyzeSentimentResponse. 
- 
  
    
      #update!(**args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Update properties of this object. 
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ AnalyzeSentimentResponse
Returns a new instance of AnalyzeSentimentResponse
| 180 181 182 | # File 'generated/google/apis/language_v1beta2/classes.rb', line 180 def initialize(**args) update!(**args) end | 
Instance Attribute Details
#document_sentiment ⇒ Google::Apis::LanguageV1beta2::Sentiment
Represents the feeling associated with the entire text or entities in
the text.
Corresponds to the JSON property documentSentiment
| 166 167 168 | # File 'generated/google/apis/language_v1beta2/classes.rb', line 166 def document_sentiment @document_sentiment end | 
#language ⇒ String
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
| 173 174 175 | # File 'generated/google/apis/language_v1beta2/classes.rb', line 173 def language @language end | 
#sentences ⇒ Array<Google::Apis::LanguageV1beta2::Sentence>
The sentiment for all the sentences in the document.
Corresponds to the JSON property sentences
| 178 179 180 | # File 'generated/google/apis/language_v1beta2/classes.rb', line 178 def sentences @sentences end | 
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
| 185 186 187 188 189 | # File 'generated/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 |