MediaPipeTasksText Framework Reference

MPPTextClassifierOptions

  @interface 
 MPPTextClassifierOptions 
 : 
  MPPTaskOptions 
 
 < 
 NSCopying 
 > 
 

Options for setting up a MPPTextClassifier .

  • The locale to use for display names specified through the TFLite Model Metadata, if any. Defaults to English.

    Declaration

    Objective-C

      @property 
     ( 
     nonatomic 
     , 
     copy 
     ) 
     NSString 
     * 
     _Nonnull 
     displayNamesLocale 
     ; 
     
    
  • The maximum number of top-scored classification results to return. If < 0, all available results will be returned. If 0, an invalid argument error is returned.

    Declaration

    Objective-C

      @property 
     ( 
     nonatomic 
     ) 
     NSInteger 
     maxResults 
     ; 
     
    
  • Score threshold to override the one provided in the model metadata (if any). Results below this value are rejected.

    Declaration

    Objective-C

      @property 
     ( 
     nonatomic 
     ) 
     float 
     scoreThreshold 
     ; 
     
    
  • The allowlist of category names. If non-empty, detection results whose category name is not in this set will be filtered out. Duplicate or unknown category names are ignored. Mutually exclusive with categoryDenylist.

    Declaration

    Objective-C

      @property 
     ( 
     nonatomic 
     , 
     copy 
     ) 
     NSArray 
     < 
     NSString 
     *> 
     * 
     _Nonnull 
     categoryAllowlist 
     ; 
     
    
  • The denylist of category names. If non-empty, detection results whose category name is in this set will be filtered out. Duplicate or unknown category names are ignored. Mutually exclusive with categoryAllowlist.

    Declaration

    Objective-C

      @property 
     ( 
     nonatomic 
     , 
     copy 
     ) 
     NSArray 
     < 
     NSString 
     *> 
     * 
     _Nonnull 
     categoryDenylist 
     ; 
     
    
Create a Mobile Website
View Site in Mobile | Classic
Share by: