Files
semantica/docs/integrations/docling.md
T
KaifAhmad1andClaude Sonnet 4.6 946a1089c8 docs: premium redesign — Mintlify v4, dark/cream theme, full module coverage
- Migrate from mint.json to docs.json (Mintlify v4)
- Theme: maple, emerald green + near-black dark / cream light palette
  (#059669 primary, #0A0A0A dark bg, #FAF7F0 light bg)
- Typography: Lexend headings, Inter body
- 5-tab navigation: Documentation, Quick Start, API Reference, Cookbook, FAQ
- Homepage: removed badge stickers, redundant h2, added blockquote tagline,
  full 27-module reference table with semantica.mcp_server added
- quickstart.md: CodeGroup per pipeline step, pattern vs LLM options,
  AccordionGroup for patterns and troubleshooting
- faq.md: full AccordionGroup structure across 5 sections
- reference/explorer.md: NEW — FastAPI explorer, Ontology Hub, Distance
  Intelligence, CLI reference, REST API endpoints
- reference/mcp_server.md: NEW — MCP stdio server, 12 tools with I/O
  examples, 3 resources, Claude Desktop/VS Code/Windsurf/Cline config
- docs.json: explorer added to Output group, mcp_server to Utilities group
- Chat, feedback (thumbs/suggest/raise), OG/Twitter metadata, search topbar
- All reference pages reformatted with Mintlify JSX components

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 21:52:50 +05:30

2.9 KiB

title, description, icon
title description icon
Docling Integration Native Docling integration for high-fidelity PDF, DOCX, and PPTX parsing with table extraction and OCR. file-lines

Parse complex documents — PDFs, DOCX, PPTX, HTML — with high-fidelity table extraction and built-in OCR.


Overview

Docling is integrated into Semantica's parse module via the DoclingParser. Documents pass through Docling's layout engine, then feed directly into Semantica's extraction and KG pipeline.

PDF, DOCX, PPTX, HTML, and more. High-fidelity table parsing with header detection. Built-in OCR for scanned documents. Clean Markdown output optimized for LLM consumption.

Installation

pip install semantica
# Docling is included as an optional dependency
# or install separately:
pip install docling

Basic Usage

from semantica.parse import DoclingParser

parser = DoclingParser(enable_ocr=True)
result = parser.parse("financial_report.pdf")

print(result["full_text"][:200])
print(f"Found {len(result['tables'])} tables")

Full Example

from semantica.parse import DoclingParser

parser = DoclingParser(
    enable_ocr=True,
    export_format="markdown",
)

result = parser.parse("complex_invoice.pdf")

# Full text content
print(result["full_text"])

# Extracted tables
for i, table in enumerate(result["tables"]):
    print(f"Table {i+1} headers: {table.get('headers', [])}")
    for row in table.get("rows", [])[:3]:
        print(f"  Row: {row}")

# Metadata
metadata = result["metadata"]
print(f"Title: {metadata.get('title')}")
print(f"Pages: {result.get('total_pages')}")

DoclingParser Parameters

Parameter Default Description
enable_ocr False Enable OCR for scanned pages
export_format "markdown" Output format: "markdown" or "text"

Parsed Result Structure

{
    "full_text":    str,         # Clean document text
    "tables":       list[dict],  # Extracted tables (headers + rows)
    "metadata":     dict,        # Title, author, creation date, etc.
    "total_pages":  int,
}

See Also

Full DocumentParser and DoclingParser reference. Loading documents before parsing. NER and relation extraction on parsed text. Using DoclingParser in a full pipeline.