Page Summary
-
IdentifyLanguageCallbackis a type definition for a block that handles the result of language identification, providing the identified language tag or an error. -
IdentifyPossibleLanguagesCallbackis a type definition for a block that handles the result of identifying possible languages, providing a list of identified languages with their confidence scores or an error.
Type Definitions
The following type definitions are available globally.
-
A block that handles a language identification result.
Declaration
Swift
typealias IdentifyLanguageCallback = (String?, Error?) -> VoidParameters
languageTagThe identified language tag for the text,
IdentifiedLanguage.undeterminedif no language was identified, ornilif there was an error.errorThe error or
nil. -
A block that handles the result of identifying possible languages.
Declaration
Swift
typealias IdentifyPossibleLanguagesCallback = ([MLKIdentifiedLanguage]?, Error?) -> VoidParameters
identifiedLanguagesThe list of identified languages for the text, or
nilin case of an error. If no languages were identified, the result will consist of a single element with the languageIdentifiedLanguage.undeterminedand confidence 1.errorThe error or
nil.