Class: Google::Apis::LanguageV2::ClassifyTextResponse
- Inherits:
-
Object
- Object
- Google::Apis::LanguageV2::ClassifyTextResponse
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/language_v2/classes.rb,
lib/google/apis/language_v2/representations.rb,
lib/google/apis/language_v2/representations.rb
Overview
The document classification response message.
Instance Attribute Summary collapse
-
#categories ⇒ Array<Google::Apis::LanguageV2::ClassificationCategory>
Categories representing the input document.
-
#language_code ⇒ 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.
-
#language_supported ⇒ Boolean
(also: #language_supported?)
Whether the language is officially supported.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ClassifyTextResponse
constructor
A new instance of ClassifyTextResponse.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ClassifyTextResponse
Returns a new instance of ClassifyTextResponse.
365 366 367 |
# File 'lib/google/apis/language_v2/classes.rb', line 365 def initialize(**args) update!(**args) end |
Instance Attribute Details
#categories ⇒ Array<Google::Apis::LanguageV2::ClassificationCategory>
Categories representing the input document.
Corresponds to the JSON property categories
349 350 351 |
# File 'lib/google/apis/language_v2/classes.rb', line 349 def categories @categories end |
#language_code ⇒ 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 languageCode
356 357 358 |
# File 'lib/google/apis/language_v2/classes.rb', line 356 def language_code @language_code end |
#language_supported ⇒ Boolean Also known as: language_supported?
Whether the language is officially supported. The API may still return a
response when the language is not supported, but it is on a best effort basis.
Corresponds to the JSON property languageSupported
362 363 364 |
# File 'lib/google/apis/language_v2/classes.rb', line 362 def language_supported @language_supported end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
370 371 372 373 374 |
# File 'lib/google/apis/language_v2/classes.rb', line 370 def update!(**args) @categories = args[:categories] if args.key?(:categories) @language_code = args[:language_code] if args.key?(:language_code) @language_supported = args[:language_supported] if args.key?(:language_supported) end |