semantica.parse extracts structured text, layout, tables, and metadata from unstructured documents:
DocumentParser: broad format support (PDF, DOCX, HTML, JSON, CSV, PPTX, XLSX), no extra dependenciesDoclingParser: complex layouts, merged-cell tables, multi-column PDFs, OCR (pip install docling)- Both return a consistent
dictwithfull_text,metadata,pages, andtableskeys parse_batch()processes multiple files in parallel with configurable error handling
Getting Started
Installation
The parse module works out of the box for standard formats:First Document Parsing
Parser Selection Guide
- DocumentParser: Standard
- DoclingParser: Complex Layouts
- Batch Processing
Zero extra dependencies. Use for clean PDFs, Word docs, HTML, and structured formats.
Exported Classes
DocumentParser
Standard parser for clean, machine-readable documents:DoclingParser
Advanced parser using the Docling backend: handles layouts thatDocumentParser cannot:
DoclingParser for:
- Multi-column PDF layouts
- Tables with merged cells or complex headers
- PPTX slides with embedded charts
- XLSX spreadsheets with formulas
- Scanned documents with OCR
- Academic papers and technical reports
OCR Support
Supported Formats
Parser Output Structure
Both parsers return dictionaries with the following structure:Metadata Structure
DocumentParser Methods
Integration with FileIngestor
The most common pattern: ingest a directory then parse each source:Docling is an optional dependency. If
docling is not installed, DoclingParser raises an ImportError with installation instructions: pip install docling. DocumentParser is always available and requires no extras.- Ingest — Load files before parsing.
- Split — Chunk parsed text for embedding and extraction.
- Docling Integration — Full Docling integration setup guide.
- Semantic Extract — Extract entities and relations from parsed text.
