Page Summary
-
This documentation details globally available type definitions for language identification.
-
MLKIdentifyLanguageCallbackis a block that handles the result of language identification, providing the identified language tag or an error. -
MLKIdentifyPossibleLanguagesCallbackis a block that handles the result of identifying possible languages, providing a list of identified languages or an error.
Type Definitions
The following type definitions are available globally.
-
A block that handles a language identification result.
Declaration
Objective-C
typedef void ( ^ MLKIdentifyLanguageCallback )( NSString * _Nullable , NSError * _Nullable )Parameters
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
Objective-C
typedef void ( ^ MLKIdentifyPossibleLanguagesCallback )( NSArray < MLKIdentifiedLanguage *> * _Nullable , NSError * _Nullable )Parameters
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.


