class Google::Apis::LanguageV1beta1::AnnotateTextResponse

The text annotations response message.

Attributes

document_sentiment[RW]

Represents the feeling associated with the entire text or entities in the text. Corresponds to the JSON property `documentSentiment` @return [Google::Apis::LanguageV1beta1::Sentiment]

entities[RW]

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` @return [Array<Google::Apis::LanguageV1beta1::Entity>]

language[RW]

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` @return [String]

sentences[RW]

Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax. Corresponds to the JSON property `sentences` @return [Array<Google::Apis::LanguageV1beta1::Sentence>]

tokens[RW]

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` @return [Array<Google::Apis::LanguageV1beta1::Token>]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/language_v1beta1/classes.rb, line 265
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/language_v1beta1/classes.rb, line 270
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