Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTextFile ¶ added in v0.7.0
IsTextFile reports whether ext (e.g. ".go") is a supported text/code extension.
Types ¶
type Indexer ¶
type Indexer struct {
// contains filtered or unexported fields
}
Indexer scans a workspace directory for PDF files and runs the IndexAgent on each one to produce semantic labels per page.
func (*Indexer) IndexDocument ¶
IndexDocument extracts text from a PDF or text/code file, builds keyword corpora, then runs the IndexAgent in batches to produce labels. Labels are upserted directly by the agent tool — no pre-registration needed.
func (*Indexer) WithExcludes ¶ added in v0.7.0
WithExcludes sets additional patterns to skip during the directory walk. Patterns are matched against directory names and file basenames using filepath.Match.
type PageCorpus ¶
PageCorpus holds the deduplicated keyword corpus for a single PDF page.
func BuildCorpora ¶
func BuildCorpora(pages []PageText) []PageCorpus
BuildCorpora converts page texts to keyword corpora in parallel. Each corpus is deduplicated, lowercased, and stripped of stop words and non-alphabetic tokens.
type PageText ¶
PageText holds the raw extracted text for a single PDF page.
func ExtractPages ¶
ExtractPages reads all pages from the PDF at pdfPath in parallel and returns a slice of PageText sorted by page number.
func ExtractTextFile ¶ added in v0.7.0
ExtractTextFile reads a text or code file and returns it as a single PageText. HTML/XML/template files have tags stripped before keyword extraction.