Class: Google::Apis::LanguageV1beta1::AnalyzeSyntaxResponse

Inherits:
Object
  • Object
show all
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 syntax 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) ⇒ AnalyzeSyntaxResponse

Returns a new instance of AnalyzeSyntaxResponse



270
271
272
# File 'generated/google/apis/language_v1beta1/classes.rb', line 270

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#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

Returns:

  • (String)


258
259
260
# File 'generated/google/apis/language_v1beta1/classes.rb', line 258

def language
  @language
end

#sentencesArray<Google::Apis::LanguageV1beta1::Sentence>

Sentences in the input document. Corresponds to the JSON property sentences



263
264
265
# File 'generated/google/apis/language_v1beta1/classes.rb', line 263

def sentences
  @sentences
end

#tokensArray<Google::Apis::LanguageV1beta1::Token>

Tokens, along with their syntactic information, in the input document. Corresponds to the JSON property tokens



268
269
270
# File 'generated/google/apis/language_v1beta1/classes.rb', line 268

def tokens
  @tokens
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



275
276
277
278
279
# File 'generated/google/apis/language_v1beta1/classes.rb', line 275

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