From 0a707256e3b6a993447bf9b6206688e1e6bb58f0 Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Fri, 13 Jan 2023 21:04:43 +0530 Subject: [PATCH] Updates to method signatures of iOS text classifier --- .../ios/text/text_classifier/sources/MPPTextClassifier.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mediapipe/tasks/ios/text/text_classifier/sources/MPPTextClassifier.h b/mediapipe/tasks/ios/text/text_classifier/sources/MPPTextClassifier.h index 60aa94614..e33615dab 100644 --- a/mediapipe/tasks/ios/text/text_classifier/sources/MPPTextClassifier.h +++ b/mediapipe/tasks/ios/text/text_classifier/sources/MPPTextClassifier.h @@ -65,7 +65,7 @@ NS_SWIFT_NAME(TextClassifier) * @return A new instance of `MPPTextClassifier` with the given model path. `nil` if there is an * error in initializing the text classifier. */ -- (instancetype)initWithModelPath:(NSString *)modelPath error:(NSError **)error; +- (nullable instancetype)initWithModelPath:(NSString *)modelPath error:(NSError **)error; /** * Creates a new instance of `MPPTextClassifier` from the given `MPPTextClassifierOptions`. @@ -78,7 +78,7 @@ NS_SWIFT_NAME(TextClassifier) * @return A new instance of `MPPTextClassifier` with the given options. `nil` if there is an * error in initializing the text classifier. */ -- (instancetype)initWithOptions:(MPPTextClassifierOptions *)options +- (nullable instancetype)initWithOptions:(MPPTextClassifierOptions *)options error:(NSError **)error NS_DESIGNATED_INITIALIZER; /** @@ -90,7 +90,8 @@ NS_SWIFT_NAME(TextClassifier) * * @return A `MPPTextClassifierResult` object that contains a list of text classifications. */ -- (nullable MPPTextClassifierResult *)classifyText:(NSString *)text error:(NSError **)error; +- (nullable MPPTextClassifierResult *)classifyText:(NSString *)text error:(NSError **)error NS_SWIFT_NAME(classify(text:)); + - (instancetype)init NS_UNAVAILABLE;