MLKitLanguageID 框架参考

MLKLanguageIdentificationOptions


@interface MLKLanguageIdentificationOptions : NSObject

LanguageIdentification”的选项。

  • 语言识别的置信度阈值。识别出的语言的置信度将高于或等于置信度阈值。该值应介于 0 到 1 之间。 如果设置的值无效,则系统会改为使用默认值。识别主要语言的默认值为 DefaultIdentifyLanguageConfidenceThreshold,识别可能的语言的默认值为 DefaultIdentifyPossibleLanguagesConfidenceThreshold

    声明

    Objective-C

    @property (nonatomic, readonly) float confidenceThreshold;
  • 创建具有指定置信度阈值的语言识别选项的新实例。

    声明

    Objective-C

    - (nonnull instancetype)initWithConfidenceThreshold:(float)confidenceThreshold;

    参数

    confidenceThreshold

    语言识别的置信度阈值。

    返回值

    具有指定置信度阈值的 LanguageIdentificationOptions 的新实例。

  • 不可用。请改用 init(confidenceThreshold:)

    声明

    Objective-C

    - (nonnull instancetype)init;