Documentation
¶
Overview ¶
Package officetext re-exports internal/officetext's native DOCX/PPTX/XLSX text extraction for external consumers (e.g. seshat-ai's upload and RAG ingestion pipelines) that want the same conversion the read_file tool uses without going through docling-serve.
Index ¶
Constants ¶
const MinCharsPerSlide = internalofficetext.MinCharsPerSlide
MinCharsPerSlide is re-exported for callers that want to reason about the PPTX sparse threshold directly (e.g. logging/diagnostics); Extract itself applies it automatically via sparse.
Variables ¶
var ErrEmpty = internalofficetext.ErrEmpty
ErrEmpty is returned when a document parses but yields no extractable text.
var SupportedExtensions = internalofficetext.SupportedExtensions
SupportedExtensions lists the formats Extract can handle natively.
Functions ¶
func Extract ¶
Extract converts a DOCX/PPTX/XLSX file's bytes to markdown. ok is false when filename's extension isn't natively supported. sparse is true when extraction "succeeded" but yielded implausibly little text for the format - currently only computed for PPTX, where a deck that's mostly screenshots/diagrams can parse fine while still needing OCR (docling) to get anything useful out of it. Callers should treat sparse the same way they already treat pdftext.Result.Sparse: prefer docling over trusting a sparse native result.
Types ¶
This section is empty.