Class: Google::Apis::LanguageV1::AnalyzeSyntaxResponse

Inherits:
Object
  • Object
show all
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 syntax analysis response message.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AnalyzeSyntaxResponse

Returns a new instance of AnalyzeSyntaxResponse.



233
234
235
# File 'lib/google/apis/language_v1/classes.rb', line 233

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)


221
222
223
# File 'lib/google/apis/language_v1/classes.rb', line 221

def language
  @language
end

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

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



226
227
228
# File 'lib/google/apis/language_v1/classes.rb', line 226

def sentences
  @sentences
end

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

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



231
232
233
# File 'lib/google/apis/language_v1/classes.rb', line 231

def tokens
  @tokens
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



238
239
240
241
242
# File 'lib/google/apis/language_v1/classes.rb', line 238

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