Documentation
¶
Overview ¶
Package ocr detects text in documents stored in S3.
Index ¶
- Variables
- type Client
- func (c *Client) AnalyzePages(ctx context.Context, key, profile, window string, pageCount int, ...) (LayoutResults, error)
- func (c *Client) Extract(parent context.Context, key string) (string, error)
- func (c *Client) ExtractPages(ctx context.Context, key, profile, window string, pageCount int, ...) (PageResults, error)
- type LayoutPage
- type LayoutResults
- type Page
- type PageResults
Constants ¶
This section is empty.
Variables ¶
var ( ErrNoText = errors.New("no_text") ErrPageLimit = errors.New("ocr_page_limit") ErrTextLimit = errors.New("ocr_text_too_large") ErrDetectionFailed = errors.New("ocr_detection_failed") )
Detection errors identify terminal text and document limits.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client performs asynchronous document text detection.
func (*Client) AnalyzePages ¶
func (c *Client) AnalyzePages(ctx context.Context, key, profile, window string, pageCount int, accepted func(context.Context) error) (LayoutResults, error)
AnalyzePages submits the stored original for combined LAYOUT and TABLES analysis and reconstructs reading order and structured tables across paginated responses.
type LayoutPage ¶
type LayoutPage struct {
Present bool
Failed bool
Partial bool
Reason string
Sections []domain.LayoutSection
Text string
}
LayoutPage holds reconstructed reading-order sections and status for one page.
type LayoutResults ¶
type LayoutResults struct {
Pages map[int]LayoutPage
Partial bool
}
LayoutResults preserves per-page layout output and provider warning flags.
type PageResults ¶
PageResults preserves page presence and provider warnings across pagination.