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

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

Overview

Result

Represents an individual result in a Google::Cloud::Translate::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



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

def confidence
  @confidence
end

#languageString (readonly)

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

Returns:

  • (String)

    the language code



120
121
122
# File 'lib/google/cloud/translate/detection.rb', line 120

def language
  @language
end