Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Coordinate ¶
Coordinate captures bounding box information.
type DiffResultSummary ¶
type DiffSummary ¶
type DiffSummary struct {
OCRDiff *DiffResultSummary `json:"ocr_diff,omitempty"`
TableDiff *DiffResultSummary `json:"table_diff,omitempty"`
Notes []string `json:"notes,omitempty"`
}
DiffSummary 汇总 diff/fuzzy 相关信息。
type Meta ¶
type Meta struct {
ProcessedPaths []string
Duration time.Duration
Warnings []string
Diagnostics map[string]any
}
Meta captures execution metadata.
type OCRPayload ¶
type OCRPayload struct {
Files []string
RawResponses [][]byte
HTMLPages []string
CombinedHTML string
RecognizedText string
NormalizedText string
Coordinates []Coordinate
TextBoxes []TextBox
PageTexts []string
NormalizedPageTexts []string
}
OCRPayload carries raw provider responses for later parsing or merging.
type OperationKind ¶
type OperationKind string
OperationKind indicates which OCR pipeline to invoke.
const ( OperationKindAny OperationKind = "any" OperationKindOCR OperationKind = "ocr" OperationKindTable OperationKind = "table" OperationKindStamp OperationKind = "stamp" )
type Request ¶
type Request struct {
Paths []string
MaxPages int
Options map[string]any
Meta map[string]string
CreatedAt time.Time
}
Request defines the standard input for a recognition workflow.
type Response ¶
type Response struct {
Meta Meta
Payload any
Diff *DiffSummary
}
Response is the generic output returned by a pipeline.
type StampDetail ¶
StampDetail holds metadata for a single detected stamp.
type StampPage ¶
type StampPage struct {
Index int
Stamp []StampDetail
}
StampPage holds detection details per page.
type StampPayload ¶
StampPayload collects stamp detection details.
type StampResponse ¶
type StampResponse struct {
Meta Meta
Payload StampPayload
}
StampResponse is the specialized response for stamp detection.
type TablePage ¶
type TablePage struct {
Index int
Width int
Height int
Recognized string
Coordinates []Coordinate
}
TablePage captures the parsed payload for a single table page.
type TablePayload ¶
type TablePayload struct {
Pages []TablePage
Raw [][]byte
Files []string
HTMLPages []string
CombinedHTML string
Text []string
NormalizedTexts []string
NormalizedCombinedText string
}
TablePayload represents table structured recognition result.
type TableResponse ¶
type TableResponse struct {
Meta Meta
Payload TablePayload
Diff *DiffSummary
}
TableResponse is the specialized response for table OCR requests.