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;