FIRVisionDocumentTextParagraph.h 1.4 KB

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