Updates to method signatures of iOS text classifier

This commit is contained in:
Prianka Liz Kariat 2023-01-13 21:04:43 +05:30
parent fa30100059
commit 0a707256e3

View File

@ -65,7 +65,7 @@ NS_SWIFT_NAME(TextClassifier)
* @return A new instance of `MPPTextClassifier` with the given model path. `nil` if there is an * @return A new instance of `MPPTextClassifier` with the given model path. `nil` if there is an
* error in initializing the text classifier. * 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`. * 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 * @return A new instance of `MPPTextClassifier` with the given options. `nil` if there is an
* error in initializing the text classifier. * error in initializing the text classifier.
*/ */
- (instancetype)initWithOptions:(MPPTextClassifierOptions *)options - (nullable instancetype)initWithOptions:(MPPTextClassifierOptions *)options
error:(NSError **)error NS_DESIGNATED_INITIALIZER; 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. * @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; - (instancetype)init NS_UNAVAILABLE;