Cloud Translation V2 API - Class Google::Cloud::Translate::V2::Detection::Result (v0.5.1)

Reference documentation and code samples for the Cloud Translation V2 API class Google::Cloud::Translate::V2::Detection::Result.

Result

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

Inherits

  • Object

Methods

#confidence

def confidence() -> Float

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

#language

def language() -> String

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

Returns
  • (String) — the language code