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;