Class: Google::Apis::LanguageV1::AnnotateTextResponse
- Inherits:
 - 
      Object
      
        
- Object
 - Google::Apis::LanguageV1::AnnotateTextResponse
 
 
- 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 text annotations response message.
Instance Attribute Summary collapse
- 
  
    
      #categories  ⇒ Array<Google::Apis::LanguageV1::ClassificationCategory> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Categories identified in the input document.
 - 
  
    
      #document_sentiment  ⇒ Google::Apis::LanguageV1::Sentiment 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Represents the feeling associated with the entire text or entities in the text.
 - 
  
    
      #entities  ⇒ Array<Google::Apis::LanguageV1::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.
 - 
  
    
      #moderation_categories  ⇒ Array<Google::Apis::LanguageV1::ClassificationCategory> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Harmful and sensitive categories identified in the input document.
 - 
  
    
      #sentences  ⇒ Array<Google::Apis::LanguageV1::Sentence> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Sentences in the input document.
 - 
  
    
      #tokens  ⇒ Array<Google::Apis::LanguageV1::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.
 
Constructor Details
#initialize(**args) ⇒ AnnotateTextResponse
Returns a new instance of AnnotateTextResponse.
      384 385 386  | 
    
      # File 'lib/google/apis/language_v1/classes.rb', line 384 def initialize(**args) update!(**args) end  | 
  
Instance Attribute Details
#categories ⇒ Array<Google::Apis::LanguageV1::ClassificationCategory>
Categories identified in the input document.
Corresponds to the JSON property categories
      347 348 349  | 
    
      # File 'lib/google/apis/language_v1/classes.rb', line 347 def categories @categories end  | 
  
#document_sentiment ⇒ Google::Apis::LanguageV1::Sentiment
Represents the feeling associated with the entire text or entities in the text.
Corresponds to the JSON property documentSentiment
      352 353 354  | 
    
      # File 'lib/google/apis/language_v1/classes.rb', line 352 def document_sentiment @document_sentiment end  | 
  
#entities ⇒ Array<Google::Apis::LanguageV1::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
      358 359 360  | 
    
      # File 'lib/google/apis/language_v1/classes.rb', line 358 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
      365 366 367  | 
    
      # File 'lib/google/apis/language_v1/classes.rb', line 365 def language @language end  | 
  
#moderation_categories ⇒ Array<Google::Apis::LanguageV1::ClassificationCategory>
Harmful and sensitive categories identified in the input document.
Corresponds to the JSON property moderationCategories
      370 371 372  | 
    
      # File 'lib/google/apis/language_v1/classes.rb', line 370 def moderation_categories @moderation_categories end  | 
  
#sentences ⇒ Array<Google::Apis::LanguageV1::Sentence>
Sentences in the input document. Populated if the user enables
AnnotateTextRequest.Features.extract_syntax.
Corresponds to the JSON property sentences
      376 377 378  | 
    
      # File 'lib/google/apis/language_v1/classes.rb', line 376 def sentences @sentences end  | 
  
#tokens ⇒ Array<Google::Apis::LanguageV1::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
      382 383 384  | 
    
      # File 'lib/google/apis/language_v1/classes.rb', line 382 def tokens @tokens end  | 
  
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
      389 390 391 392 393 394 395 396 397  | 
    
      # File 'lib/google/apis/language_v1/classes.rb', line 389 def update!(**args) @categories = args[:categories] if args.key?(:categories) @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment) @entities = args[:entities] if args.key?(:entities) @language = args[:language] if args.key?(:language) @moderation_categories = args[:moderation_categories] if args.key?(:moderation_categories) @sentences = args[:sentences] if args.key?(:sentences) @tokens = args[:tokens] if args.key?(:tokens) end  |