Class: Google::Cloud::Translate::V2::Detection::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/translate/v2/detection.rb

Overview

Result

Represents an individual result in a Google::Cloud::Translate::V2::Detection result.

Instance Attribute Summary collapse

Instance Attribute Details

#confidenceFloat (readonly)

The confidence that the language detection result is correct. The closer this value is to 1, the higher the confidence in language detection.

Returns:

  • (Float)

    a value between 0 and 1



105
106
107
# File 'lib/google/cloud/translate/v2/detection.rb', line 105

def confidence
  @confidence
end

#languageString (readonly)

The language detected. This is an ISO 639-1 language code.

Returns:

  • (String)

    the language code



112
113
114
# File 'lib/google/cloud/translate/v2/detection.rb', line 112

def language
  @language
end