run-llama /liteparse

A fast, helpful, and open-source document parser

★ 12,976⑂ 897👁 36▤ 211
12,976
stars
+0+4+188
897
forks
36
watchers
–
prs
–
issues
211
releases
–
discussions

README

LiteParse


|

|

|

|

|

|
文档

English | 简体中文



 在找 LiteParse V1?请访问 旧版代码仓库。

LiteParse 是一款独立的开源 PDF 解析工具,专注于快速、轻量的文档解析。它能输出高质量的、带有标注(bounding box)的空间文本信息,无需依赖任何闭源大模型或云端服务,所有处理都在本地完成。

本地解析能力不够用?
对于复杂文档(密集表格、多栏布局、图表、手写文字或扫描版 PDF),我们的云端文档解析工具 LlamaParse 能给出明显更好的结果。它专为生产级文档处理流水线设计,会替你搞定那些棘手的情况,让模型直接拿到干净、结构化的数据和 markdown。

  免费注册 LlamaParse

 概览

- 快速文本解析:基于 PDFium 的空间文本解析
- 灵活的 OCR 体系:
  - 内置:Tesseract(开箱即用,已随库打包)
  - HTTP 服务:可接入任意 OCR 服务(EasyOCR、PaddleOCR 或自建服务)
  - 标准化 API:简洁、定义清晰的 OCR API 规范
- 页面截图生成:为 LLM 智能体生成高质量的页面截图
- 多种输出格式:JSON 和纯文本
- 边界框信息:精确的文本位置坐标
- 多语言绑定:可在 Rust、Node.js / TypeScript、Python 以及浏览器(WASM)中使用
- 跨平台:支持 Linux、macOS(Intel / ARM)和 Windows

mermaid
flowchart LR
      subgraph Input["Input Formats"]
          direction TB
          PDF["PDF"]
          DOCX["DOCX"]
          XLSX["XLSX"]
          PPTX["PPTX"]
          IMG["Images"]
      end

      subgraph Core["Rust Core"]
          direction TB
          CONV["Format Conversion\nLibreOffice / image/resvg/usvg rust crates"]
          EXTRACT["Text Extraction\nPDFium C library"]
          OCR["Selective OCR\nTesseract / HTTP / Custom"]
          MERGE["OCR Merge\nNative text + OCR results"]
          PROJ["Grid Projection\nSpatial layout reconstruction"]
          CONV -- EXTRACT
          EXTRACT -- OCR -- MERGE -- PROJ
          EXTRACT -- MERGE
      end

      subgraph Output[" Output "]
          direction TB
          JSON["Structured JSON\ntext + bounding boxes"]
          TEXT["Plain Text\nlayout-preserved"]
          SCREEN["Screenshots\nPNG rendering"]
      end

      subgraph Bindings["Language Bindings"]
          direction TB
          NAPI["Node.js / TypeScript\nnapi-rs"]
          PYO3["Python\nPyO3"]
          WASM["Browser / WASM\nwasm-bindgen"]
          CLI["CLI\ncargo / npm / pip"]
          NAPI ~~~ PYO3 ~~~ WASM ~~~ CLI
      end

      PDF -- EXTRACT
      DOCX & XLSX & PPTX & IMG -- CONV
      PROJ -- JSON & TEXT & SCREEN
      JSON & TEXT & SCREEN -- Bindings

      style Input fill:F5F5F5,color:000000,stroke:37D7FA,stroke-width:2px
      style Core fill:F5F5F5,color:000000,stroke:3E18F9,stroke-width:2px
      style Output fill:F5F5F5,color:000000,stroke:FF8705,stroke-width:2px
      style Bindings fill:F5F5F5,color:000000,stroke:FF8DF2,stroke-width:2px

      style PDF fill:96E7F9,color:000000,stroke:37D7FA,stroke-width:1px
      style DOCX fill:96E7F9,color:000000,stroke:37D7FA,stroke-width:1px
      style XLSX fill:96E7F9,color:000000,stroke:37D7FA,stroke-width:1px
      style PPTX fill:96E7F9,color:000000,stroke:37D7FA,stroke-width:1px
      style IMG fill:96E7F9,color:000000,stroke:37D7FA,stroke-width:1px

      style CONV fill:92AEFF,color:000000,stroke:4B72FE,stroke-width:1px
      style EXTRACT fill:92AEFF,color:000000,stroke:4B72FE,stroke-width:1px
      style OCR fill:92AEFF,color:000000,stroke:4B72FE,stroke-width:1px
      style MERGE fill:92AEFF,color:000000,stroke:4B72FE,stroke-width:1px
      style PROJ fill:4B72FE,color:FFFFFF,stroke

Snapshot: 2026-11-04T14:00:00Z · Data license Apache-2.0 · JSON