TranslationResult

public struct TranslationResult : Codable, Equatable

TranslationResult.

  • An estimate of the number of words in the input text.

    Declaration

    Swift

    public var wordCount: Int
  • Number of characters in the input text.

    Declaration

    Swift

    public var characterCount: Int
  • The language code of the source text if the source language was automatically detected.

    Declaration

    Swift

    public var detectedLanguage: String?
  • A score between 0 and 1 indicating the confidence of source language detection. A higher value indicates greater confidence. This is returned only when the service automatically detects the source language.

    Declaration

    Swift

    public var detectedLanguageConfidence: Double?
  • List of translation output in UTF-8, corresponding to the input text entries.

    Declaration

    Swift

    public var translations: [Translation]