FIRVisionCloudTextRecognizerOptions.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #import <Foundation/Foundation.h>
  2. NS_ASSUME_NONNULL_BEGIN
  3. /**
  4. * @enum VisionCloudTextModelType
  5. * An enum of model types for cloud text recognition.
  6. */
  7. typedef NS_ENUM(NSUInteger, FIRVisionCloudTextModelType) {
  8. /**
  9. * Sparse or regular text cloud model type.
  10. */
  11. FIRVisionCloudTextModelTypeSparse,
  12. /**
  13. * Dense or document text cloud model type.
  14. */
  15. FIRVisionCloudTextModelTypeDense,
  16. } NS_SWIFT_NAME(VisionCloudTextModelType);
  17. /**
  18. * Options for a cloud text recognizer.
  19. */
  20. NS_SWIFT_NAME(VisionCloudTextRecognizerOptions)
  21. @interface FIRVisionCloudTextRecognizerOptions : NSObject
  22. /**
  23. * Model type for cloud text recognition. The default is `VisionCloudTextModelType.sparse`.
  24. */
  25. @property(nonatomic) FIRVisionCloudTextModelType modelType;
  26. /**
  27. * An array of hinted language codes for cloud text recognition. The default is `nil`. See
  28. * https://cloud.google.com/vision/docs/languages for supported language codes.
  29. */
  30. @property(nonatomic, copy, nullable) NSArray<NSString *> *languageHints;
  31. /**
  32. * API key to use for Cloud Vision API. If `nil`, the default API key from FirebaseApp will be used.
  33. */
  34. @property(nonatomic, copy, nullable) NSString *APIKeyOverride;
  35. /**
  36. * Designated initializer that creates a new instance of cloud text recognizer options.
  37. */
  38. - (instancetype)init NS_DESIGNATED_INITIALIZER;
  39. @end
  40. NS_ASSUME_NONNULL_END