What is DocLang?
mainDocLang is a universal, AI-native markup language designed to represent structured document content. Unlike traditional formats like HTML or LaTeX, DocLang is optimized for Large Language Model (LLM) and Vision-Language Model (VLM) workflows by focusing on:
- Token Efficiency: Uses a controlled, minimalist vocabulary of tags and attributes to map naturally to LLM tokenizers.
- Semantic & Geometric Preservation: Maintains document structure, semantics, and layout/geometric information (like bounding boxes) simultaneously.
- Complex Component Support: Provides native primitives for tables (including spanned cells and headings), formulas, code, nested lists, and charts.
- Lossless Round-tripping: Enables conversion between formats while preserving the original content's meaning and structure.
It is specifically designed to bridge the gap between OCR-centric formats (like PageXML or ALTO XML) and generative AI requirements, prioritizing semantic context over mere geometric location.