textract

package
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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

func (s *Textract) AnalyzeID(data []byte) (doc *types.IdentityDocument, err error)

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

func (s *Textract) DetectDocumentText(data []byte) (blocks []types.Block, err error)

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) Disconnect

func (s *Textract) Disconnect()

Disconnect will clear textract client

func (*Textract) UpdateParentSegment

func (s *Textract) UpdateParentSegment(parentSegment *xray.XRayParentSegment)

UpdateParentSegment updates this struct's xray parent segment, if no parent segment, set nil

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL