Class: Google::Apis::TranslateV3::DetectedLanguage
- Inherits:
-
Object
- Object
- Google::Apis::TranslateV3::DetectedLanguage
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/translate_v3/classes.rb,
lib/google/apis/translate_v3/representations.rb,
lib/google/apis/translate_v3/representations.rb
Overview
The response message for language detection.
Instance Attribute Summary collapse
-
#confidence ⇒ Float
The confidence of the detection result for this language.
-
#language_code ⇒ String
The BCP-47 language code of source content in the request, detected automatically.
Instance Method Summary collapse
-
#initialize(**args) ⇒ DetectedLanguage
constructor
A new instance of DetectedLanguage.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ DetectedLanguage
Returns a new instance of DetectedLanguage.
295 296 297 |
# File 'lib/google/apis/translate_v3/classes.rb', line 295 def initialize(**args) update!(**args) end |
Instance Attribute Details
#confidence ⇒ Float
The confidence of the detection result for this language.
Corresponds to the JSON property confidence
287 288 289 |
# File 'lib/google/apis/translate_v3/classes.rb', line 287 def confidence @confidence end |
#language_code ⇒ String
The BCP-47 language code of source content in the request, detected
automatically.
Corresponds to the JSON property languageCode
293 294 295 |
# File 'lib/google/apis/translate_v3/classes.rb', line 293 def language_code @language_code end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
300 301 302 303 |
# File 'lib/google/apis/translate_v3/classes.rb', line 300 def update!(**args) @confidence = args[:confidence] if args.key?(:confidence) @language_code = args[:language_code] if args.key?(:language_code) end |