Documentation ¶
Index ¶
- func MakeDocPageLocations(b *flatbuffers.Builder, dpl DocPageLocations) []byte
- func MakeDocPositions(b *flatbuffers.Builder, doc DocPositions) []byte
- func MakeSerialPdfIndex(b *flatbuffers.Builder, spi SerialPdfIndex) []byte
- func MakeTextLocation(b *flatbuffers.Builder, loc TextLocation) []byte
- func WriteSerialPdfIndex(spi SerialPdfIndex) []byte
- type DocPageLocations
- type DocPositions
- type HashIndexPathDoc
- type SerialPdfIndex
- type TextLocation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeDocPageLocations ¶
func MakeDocPageLocations(b *flatbuffers.Builder, dpl DocPageLocations) []byte
func MakeDocPositions ¶
func MakeDocPositions(b *flatbuffers.Builder, doc DocPositions) []byte
func MakeSerialPdfIndex ¶
func MakeSerialPdfIndex(b *flatbuffers.Builder, spi SerialPdfIndex) []byte
func MakeTextLocation ¶
func MakeTextLocation(b *flatbuffers.Builder, loc TextLocation) []byte
Types ¶
type DocPageLocations ¶
type DocPageLocations struct { Doc uint64 Page uint32 Locations []TextLocation }
table DocPageLocations { doc: uint64; page: uint32; locations: [TextLocation]; }
func ReadDocPageLocations ¶
func ReadDocPageLocations(buf []byte) (DocPageLocations, error)
type DocPositions ¶
type DocPositions struct { Path string // Path of input PDF file. DocIdx uint64 // Index into lState.fileList. PageNums []uint32 PageTexts []string }
// DocPositions tracks the data that is used to index a PDF file.
table DocPositions { path: string; // Path of input PDF file. doc_idx: uint64; // Index into lState.fileList. page_nums: [uint32]; page_texts: [string]; }
func ReadDocPositions ¶
func ReadDocPositions(buf []byte) (DocPositions, error)
func (DocPositions) String ¶
func (doc DocPositions) String() string
type HashIndexPathDoc ¶
type HashIndexPathDoc struct { Hash string Index uint64 Path string Doc DocPositions }
table HashIndexPathDoc { hash: string; index: uint64; path: string; doc: DocPositions; }
type SerialPdfIndex ¶
type SerialPdfIndex struct { NumFiles uint32 NumPages uint32 BleveMem []byte HIPDs []HashIndexPathDoc }
table PdfIndex { num_files: uint32; num_pages: uint32; index : [byte]; hipd: [HashIndexPathDoc]; }
func ReadSerialPdfIndex ¶
func ReadSerialPdfIndex(buf []byte) (SerialPdfIndex, error)
type TextLocation ¶
table TextLocation { offset: uint32; llx: float32; lly: float32; urx: float32; ury: float32; }
TextLocation describes the location of text on a page.
func ReadTextLocation ¶
func ReadTextLocation(buf []byte) TextLocation
func (TextLocation) String ¶
func (t TextLocation) String() string
Click to show internal directories.
Click to hide internal directories.