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 dependencies
  • DoclingParser: complex layouts, merged-cell tables, multi-column PDFs, OCR (pip install docling)
  • Both return a consistent dict with full_text, metadata, pages, and tables keys
  • 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:
For enhanced table extraction and complex layouts, install the Docling dependency:

First Document Parsing

Parser Selection Guide

Zero extra dependencies. Use for clean PDFs, Word docs, HTML, and structured formats.

Exported Classes

DocumentParser

Standard parser for clean, machine-readable documents:
Supported formats: PDF, DOCX, HTML, TXT, JSON, CSV, PPTX, XLSX.

DoclingParser

Advanced parser using the Docling backend: handles layouts that DocumentParser cannot:
Use 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.