Documentation
¶
Overview ¶
Package xberg implements Eino's document parser interface with the native Xberg extraction engine.
Index ¶
- Constants
- func WithChunking(config native.ChunkingConfig) einoparser.Option
- func WithDocumentMode(mode DocumentMode) einoparser.Option
- func WithFileConfig(config native.FileExtractionConfig) einoparser.Option
- func WithFilename(filename string) einoparser.Option
- func WithForceOCRPages(pages ...uint32) einoparser.Option
- func WithMIMEType(mimeType string) einoparser.Option
- func WithNativeFileConfig(apply func(*native.FileExtractionConfig)) einoparser.Option
- func WithOCR(config native.OcrConfig) einoparser.Option
- func WithOutputFormat(format native.OutputFormat) einoparser.Option
- func WithPDF(config native.PdfConfig) einoparser.Option
- func WithPDFPasswords(passwords ...string) einoparser.Option
- func WithPages(config native.PageConfig) einoparser.Option
- func WithTimeout(timeout time.Duration) einoparser.Option
- type Config
- type DocumentMode
- type Parser
Constants ¶
View Source
const ( MetaKeyMIMEType = "xberg_mime_type" MetaKeyDocumentIndex = "xberg_document_index" MetaKeyDocumentCount = "xberg_document_count" MetaKeyNativeMetadata = "xberg_metadata" MetaKeyCounts = "xberg_counts" MetaKeyExtractionMethod = "xberg_extraction_method" MetaKeyDetectedLanguages = "xberg_detected_languages" MetaKeyTables = "xberg_tables" MetaKeyWarnings = "xberg_warnings" MetaKeyErrors = "xberg_errors" MetaKeyPageNumber = "xberg_page_number" MetaKeyPageBlank = "xberg_page_blank" MetaKeySheetName = "xberg_sheet_name" MetaKeySectionName = "xberg_section_name" MetaKeySpeakerNotes = "xberg_speaker_notes" MetaKeyImageIndices = "xberg_image_indices" MetaKeyChunkIndex = "xberg_chunk_index" MetaKeyTotalChunks = "xberg_total_chunks" MetaKeyByteStart = "xberg_byte_start" MetaKeyByteEnd = "xberg_byte_end" MetaKeyFirstPage = "xberg_first_page" MetaKeyLastPage = "xberg_last_page" MetaKeyHeadingPath = "xberg_heading_path" MetaKeyChunkType = "xberg_chunk_type" MetaKeyElementType = "xberg_element_type" MetaKeyElementMetadata = "xberg_element_metadata" )
Variables ¶
This section is empty.
Functions ¶
func WithChunking ¶
func WithChunking(config native.ChunkingConfig) einoparser.Option
func WithDocumentMode ¶
func WithDocumentMode(mode DocumentMode) einoparser.Option
func WithFileConfig ¶
func WithFileConfig(config native.FileExtractionConfig) einoparser.Option
func WithFilename ¶
func WithFilename(filename string) einoparser.Option
func WithForceOCRPages ¶
func WithForceOCRPages(pages ...uint32) einoparser.Option
func WithMIMEType ¶
func WithMIMEType(mimeType string) einoparser.Option
func WithNativeFileConfig ¶
func WithNativeFileConfig(apply func(*native.FileExtractionConfig)) einoparser.Option
WithNativeFileConfig is the escape hatch for Xberg features not covered by the convenience options in this package.
func WithOutputFormat ¶
func WithOutputFormat(format native.OutputFormat) einoparser.Option
func WithPDFPasswords ¶
func WithPDFPasswords(passwords ...string) einoparser.Option
func WithPages ¶
func WithPages(config native.PageConfig) einoparser.Option
func WithTimeout ¶
func WithTimeout(timeout time.Duration) einoparser.Option
Types ¶
type Config ¶
type Config struct {
Core core.Config
DocumentMode DocumentMode
}
Config combines adapter-specific behavior with the reusable core extractor configuration. Native Xberg settings live in Core.Native.
type DocumentMode ¶
type DocumentMode string
const ( DocumentModeDocument DocumentMode = "document" DocumentModePage DocumentMode = "page" DocumentModeChunk DocumentMode = "chunk" DocumentModeElement DocumentMode = "element" )
Click to show internal directories.
Click to hide internal directories.