Documentation
¶
Index ¶
- Variables
- func CleanTitleText(s string) string
- func IsRetryable(err error) bool
- func MergeChunkResponses(results []ocrs.OCRResult) (ocrs.OCRResult, error)
- func ParseStructuredChunks(raw []byte) (string, []ocrs.ProcessedChunk, error)
- func ParseStructuredChunksByReader(rd io.Reader) (string, []ocrs.ProcessedChunk, error)
- type Client
- type DataInfo
- type DocPreprocessorRes
- type DocPreprocessorSettings
- type LayoutBox
- type LayoutDetectionRes
- type LayoutParsingResult
- type MarkdownResult
- type ModelSettings
- type OCRResponse
- type OCRResult
- type PageInfo
- type ParsingBlock
- type PrunedResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAllTokensExhaustedToday = errors.New("all tokens exhausted for today")
Functions ¶
func CleanTitleText ¶
func IsRetryable ¶
func MergeChunkResponses ¶
func ParseStructuredChunks ¶
func ParseStructuredChunks(raw []byte) (string, []ocrs.ProcessedChunk, error)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientWithTokens ¶
type DocPreprocessorRes ¶
type DocPreprocessorRes struct {
ModelSettings DocPreprocessorSettings `json:"model_settings"`
Angle int `json:"angle"`
}
type DocPreprocessorSettings ¶
type LayoutDetectionRes ¶
type LayoutDetectionRes struct {
Boxes []LayoutBox `json:"boxes"`
}
type LayoutParsingResult ¶
type LayoutParsingResult struct {
PrunedResult PrunedResult `json:"prunedResult"`
Markdown MarkdownResult `json:"markdown"`
OutputImages map[string]string `json:"outputImages"`
InputImage string `json:"inputImage"`
}
type MarkdownResult ¶
type ModelSettings ¶
type ModelSettings struct {
UseDocPreprocessor bool `json:"use_doc_preprocessor"`
UseLayoutDetection bool `json:"use_layout_detection"`
UseChartRecognition bool `json:"use_chart_recognition"`
UseSealRecognition bool `json:"use_seal_recognition"`
UseOCRForImageBlock bool `json:"use_ocr_for_image_block"`
FormatBlockContent bool `json:"format_block_content"`
MergeLayoutBlocks bool `json:"merge_layout_blocks"`
MarkdownIgnoreLabels []string `json:"markdown_ignore_labels"`
}
type OCRResponse ¶
type OCRResult ¶
type OCRResult struct {
LayoutParsingResults []LayoutParsingResult `json:"layoutParsingResults"`
DataInfo DataInfo `json:"dataInfo"`
PreprocessedImages []string `json:"preprocessedImages"`
}
type ParsingBlock ¶
type PrunedResult ¶
type PrunedResult struct {
PageCount int `json:"page_count"`
Width int `json:"width"`
Height int `json:"height"`
ModelSettings ModelSettings `json:"model_settings"`
ParsingResList []ParsingBlock `json:"parsing_res_list"`
DocPreprocessorRes DocPreprocessorRes `json:"doc_preprocessor_res"`
LayoutDetRes LayoutDetectionRes `json:"layout_det_res"`
}
Click to show internal directories.
Click to hide internal directories.