File size: 783 Bytes
5840d20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"""Document parsing — the first half of the knowledge pipeline.

PDF/DOCX in, a versioned `ParsedDocument` out. The extraction half consumes that
artifact and never the parser itself, which is what keeps MinerU swappable.

Additive and flag-gated: the existing unstructured path (`src/knowledge/`,
Tesseract OCR -> chunk -> pgvector) is untouched and keeps running as-is.

Heavy dependencies (MinerU, torch) are an optional extra — see `pyproject.toml`.
Importing this package does not import them; only `parse.py` does, at call time,
so the agent service starts without them installed.
"""

from .contracts import SCHEMA_VERSION, Chunk, Mention, ParsedDocument, TermRecord

__all__ = [
    "SCHEMA_VERSION",
    "Chunk",
    "Mention",
    "ParsedDocument",
    "TermRecord",
]