FIRVisionDocumentTextWord.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #import <CoreGraphics/CoreGraphics.h>
  2. #import <Foundation/Foundation.h>
  3. @class FIRVisionDocumentTextSymbol;
  4. @class FIRVisionTextRecognizedBreak;
  5. @class FIRVisionTextRecognizedLanguage;
  6. NS_ASSUME_NONNULL_BEGIN
  7. /**
  8. * A document text word recognized in an image that consists of an array of symbols.
  9. */
  10. NS_SWIFT_NAME(VisionDocumentTextWord)
  11. @interface FIRVisionDocumentTextWord : NSObject
  12. /**
  13. * String representation of the document text word that was recognized.
  14. */
  15. @property(nonatomic, readonly) NSString *text;
  16. /**
  17. * An array of symbols in the document text word.
  18. */
  19. @property(nonatomic, readonly) NSArray<FIRVisionDocumentTextSymbol *> *symbols;
  20. /**
  21. * The rectangle that contains the document text word relative to the image in the default
  22. * coordinate space.
  23. */
  24. @property(nonatomic, readonly) CGRect frame;
  25. /**
  26. * The confidence of the recognized document text word.
  27. */
  28. @property(nonatomic, readonly) NSNumber *confidence;
  29. /**
  30. * An array of recognized languages in the document text word. If no languages are recognized, the
  31. * array is empty.
  32. */
  33. @property(nonatomic, readonly) NSArray<FIRVisionTextRecognizedLanguage *> *recognizedLanguages;
  34. /**
  35. * The recognized start or end of the document text word.
  36. */
  37. @property(nonatomic, readonly, nullable) FIRVisionTextRecognizedBreak *recognizedBreak;
  38. /**
  39. * Unavailable.
  40. */
  41. - (instancetype)init NS_UNAVAILABLE;
  42. @end
  43. NS_ASSUME_NONNULL_END