MediaPipeTasksText Framework Reference

MPPLanguagePrediction

@interface MPPLanguagePrediction : NSObject

/** The i18n language / locale code for the prediction. */
@property(nonatomic, readonly) NSString *languageCode;

/** The probability for the prediction. */
@property(nonatomic, readonly) float probability;

/**
 * Initializes a new `LanguagePrediction` with the given language code and probability.
 *
 * @param languageCode The i18n language / locale code for the prediction.
 * @param probability The probability for the prediction.
 *
 * @return An instance of `LanguagePrediction` initialized with the given language code and
 * probability.
 */
- (instancetype)initWithLanguageCode:(NSString *)languageCode probability:(float)probability;

@end

Undocumented

  • The i18n language / locale code for the prediction.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull languageCode;
  • The probability for the prediction.

    Declaration

    Objective-C

    @property (nonatomic, readonly) float probability;
  • Initializes a new LanguagePrediction with the given language code and probability.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLanguageCode:(nonnull NSString *)languageCode
                                     probability:(float)probability;

    Parameters

    languageCode

    The i18n language / locale code for the prediction.

    probability

    The probability for the prediction.

    Return Value

    An instance of LanguagePrediction initialized with the given language code and probability.