Class: Google::Apis::LanguageV1beta1::AnnotateTextResponse
- Inherits:
- 
      Object
      
        - Object
- Google::Apis::LanguageV1beta1::AnnotateTextResponse
 
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/language_v1beta1/classes.rb,
 generated/google/apis/language_v1beta1/representations.rb,
 generated/google/apis/language_v1beta1/representations.rb
Overview
The text annotations response message.
Instance Attribute Summary collapse
- 
  
    
      #document_sentiment  ⇒ Google::Apis::LanguageV1beta1::Sentiment 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Represents the feeling associated with the entire text or entities in the text. 
- 
  
    
      #entities  ⇒ Array<Google::Apis::LanguageV1beta1::Entity> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Entities, along with their semantic information, in the input document. 
- 
  
    
      #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::LanguageV1beta1::Sentence> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Sentences in the input document. 
- 
  
    
      #tokens  ⇒ Array<Google::Apis::LanguageV1beta1::Token> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Tokens, along with their syntactic information, in the input document. 
Instance Method Summary collapse
- 
  
    
      #initialize(**args)  ⇒ AnnotateTextResponse 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of AnnotateTextResponse. 
- 
  
    
      #update!(**args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Update properties of this object. 
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ AnnotateTextResponse
Returns a new instance of AnnotateTextResponse
| 269 270 271 | # File 'generated/google/apis/language_v1beta1/classes.rb', line 269 def initialize(**args) update!(**args) end | 
Instance Attribute Details
#document_sentiment ⇒ Google::Apis::LanguageV1beta1::Sentiment
Represents the feeling associated with the entire text or entities in
the text.
Corresponds to the JSON property documentSentiment
| 240 241 242 | # File 'generated/google/apis/language_v1beta1/classes.rb', line 240 def document_sentiment @document_sentiment end | 
#entities ⇒ Array<Google::Apis::LanguageV1beta1::Entity>
Entities, along with their semantic information, in the input document.
Populated if the user enables
AnnotateTextRequest.Features.extract_entities.
Corresponds to the JSON property entities
| 247 248 249 | # File 'generated/google/apis/language_v1beta1/classes.rb', line 247 def entities @entities 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
| 254 255 256 | # File 'generated/google/apis/language_v1beta1/classes.rb', line 254 def language @language end | 
#sentences ⇒ Array<Google::Apis::LanguageV1beta1::Sentence>
Sentences in the input document. Populated if the user enables
AnnotateTextRequest.Features.extract_syntax.
Corresponds to the JSON property sentences
| 260 261 262 | # File 'generated/google/apis/language_v1beta1/classes.rb', line 260 def sentences @sentences end | 
#tokens ⇒ Array<Google::Apis::LanguageV1beta1::Token>
Tokens, along with their syntactic information, in the input document.
Populated if the user enables
AnnotateTextRequest.Features.extract_syntax.
Corresponds to the JSON property tokens
| 267 268 269 | # File 'generated/google/apis/language_v1beta1/classes.rb', line 267 def tokens @tokens end | 
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
| 274 275 276 277 278 279 280 | # File 'generated/google/apis/language_v1beta1/classes.rb', line 274 def update!(**args) @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment) @entities = args[:entities] if args.key?(:entities) @language = args[:language] if args.key?(:language) @sentences = args[:sentences] if args.key?(:sentences) @tokens = args[:tokens] if args.key?(:tokens) end |