Expand description
Any-doc bridge — lower PDF / DOCX / PPTX / HTML / MD / TXT to plain text, natively in Rust, so the
folder ingest can project every readable document into the hypergraph (not just tabular/text files).
The extracted text feeds the same TextEngine (SPO tagger + SPLADE + gazetteer) as .txt.
Text-layer extraction only: scanned/image PDFs (no text layer) yield little — OCR (the bundled
PP-OCRv6 models) is the follow-up. Gated behind the docs feature (implies onnx).
Constants§
- DOC_
EXTS - The document extensions this bridge can lower to text.
Functions§
- extract_
text - Extract plain text from a document by extension.
Ok(None)= unsupported type;Err= read/parse failure the caller can report and skip. - is_
doc_ ext - strip_
html - Minimal HTML → text: drop
<script>/<style>blocks, strip tags, decode common entities, collapse whitespace. Enough for retrieval; not a full renderer.