MLKitLanguageID Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
MLKLanguageIdentificationOptions
@interface MLKLanguageIdentificationOptions : NSObject
Options for LanguageIdentification
.
-
The confidence threshold for language identification. The identified languages will have a
confidence higher or equal to the confidence threshold. The value should be between 0 and 1.
If an invalid value is set, the default value is used instead. The default value for identifying
the main language is DefaultIdentifyLanguageConfidenceThreshold
and for identifying possible
languages is DefaultIdentifyPossibleLanguagesConfidenceThreshold
.
Declaration
Objective-C
@property (nonatomic, readonly) float confidenceThreshold;
-
Creates a new instance of language identification options with the given confidence threshold.
Declaration
Objective-C
- (nonnull instancetype)initWithConfidenceThreshold:(float)confidenceThreshold;
Parameters
confidenceThreshold
|
The confidence threshold for language identification.
|
Return Value
A new instance of LanguageIdentificationOptions
with the given confidence threshold.
-
Unavailable. Use init(confidenceThreshold:)
instead.
Declaration
Objective-C
- (nonnull instancetype)init;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["`MLKLanguageIdentificationOptions` provides configuration for language identification tasks."],["It allows setting a confidence threshold to filter identified languages based on their confidence scores."],["The default confidence thresholds differ for identifying the main language versus possible languages."],["A new instance is created using `initWithConfidenceThreshold:` with a desired confidence value."],["The default initializer `init` is unavailable and `init(confidenceThreshold:)` should be used instead."]]],[]]