Documentation ¶
Index ¶
- type Textract
- func (s *Textract) AnalyzeID(data []byte) (fields map[string]string, err error)
- func (s *Textract) Connect(parentSegment ...*xray.XRayParentSegment) (err error)
- func (s *Textract) DetectDocumentText(data []byte) (blocks []types.Block, err error)
- func (s *Textract) Disconnect()
- func (s *Textract) UpdateParentSegment(parentSegment *xray.XRayParentSegment)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Textract ¶
type Textract struct { // define the AWS region that Textract is located at AwsRegion awsregion.AWSRegion // custom http2 client options HttpOptions *awshttp2.HttpClientSettings // contains filtered or unexported fields }
Textract struct encapsulates the AWS Textract access functionality
func (*Textract) AnalyzeID ¶
Analyzes identity documents for relevant information. This information is extracted and returned as IdentityDocumentFields , which records both the normalized field and value of the extracted text. Unlike other Amazon Textract operations, AnalyzeID doesn't return any Geometry data.
func (*Textract) Connect ¶
func (s *Textract) Connect(parentSegment ...*xray.XRayParentSegment) (err error)
Connect will establish a connection to the Textract service
func (*Textract) DetectDocumentText ¶ added in v1.4.3
Detects text in the input document. Amazon Textract can detect lines of text and the words that make up a line of text. The input document must be in one of the following image formats: JPEG, PNG, PDF, or TIFF. DetectDocumentText returns the detected text in an array of Block objects. Each document page has as an associated Block of type PAGE. Each PAGE Block object is the parent of LINE Block objects that represent the lines of detected text on a page. A LINE Block object is a parent for each word that makes up the line. Words are represented by Block objects of type WORD. DetectDocumentText is a synchronous operation. To analyze documents asynchronously, use StartDocumentTextDetection . For more information, see Document Text Detection (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html) .
func (*Textract) UpdateParentSegment ¶
func (s *Textract) UpdateParentSegment(parentSegment *xray.XRayParentSegment)
UpdateParentSegment updates this struct's xray parent segment, if no parent segment, set nil