From hermes-qq
Extracts structured data from PDFs to Markdown, JSON (with bounding boxes), or HTML using benchmark-top OpenDataLoader. Fast local mode or hybrid AI for tables, scans, formulas in RAG/LLM pipelines.
npx claudepluginhub chujianyun/skills --plugin hermes-qqThis skill uses the workspace's default tool permissions.
**PDF 解析器 · 基准测试第一 · RAG/LLM 数据提取利器**
Converts PDF files to Markdown using opendataloader-pdf, extracting text, tables, headings, lists, and images in correct reading order. For PDF parsing, document extraction, and AI/LLM/RAG data preparation.
Parses PDFs, DOCX, PPTX, HTML, images (20+ formats) to Markdown/HTML/JSON/text with layout/tables/OCR. Chunks for RAG pipelines; batch converts via DocumentConverter.
Converts PDF, DOCX, PPTX, XLSX, HTML, images to structured Markdown or JSON using Docling. Preserves tables, layout, hierarchy for RAG pipelines and knowledge bases.
Share bugs, ideas, or general feedback.
PDF 解析器 · 基准测试第一 · RAG/LLM 数据提取利器
pip install -U opendataloader-pdf
混合 AI 模式(复杂表格 / OCR / 公式):
pip install "opendataloader-pdf[hybrid]"
# 快速模式:输出 Markdown + JSON
opendataloader-pdf input.pdf output_dir/
# 指定格式
opendataloader-pdf input.pdf output_dir/ --format markdown,json,html
# 混合 AI 模式(复杂表格 / 扫描件)
opendataloader-pdf --hybrid docling-fast input.pdf output_dir/
# 混合模式 + OCR(扫描件)
opendataloader-pdf --hybrid docling-fast --force-ocr input.pdf output_dir/
# 混合模式 + 公式识别
opendataloader-pdf --hybrid docling-fast --hybrid-mode full input.pdf output_dir/
import opendataloader_pdf
# 批量处理(一次调用会启动 JVM,建议批量一次性传入)
opendataloader_pdf.convert(
input_path=["file1.pdf", "file2.pdf", "folder/"],
output_dir="output/",
format="markdown,json"
)
| 文档类型 | 模式 | 命令 |
|---|---|---|
| 标准数字 PDF | 快速(默认) | opendataloader-pdf file.pdf out/ |
| 复杂/无线框表格 | 混合 | opendataloader-pdf --hybrid docling-fast file.pdf out/ |
| 扫描件 | 混合 + OCR | 同上 + --force-ocr |
| 非英语扫描件 | 混合 + OCR | --force-ocr --ocr-lang "ko,en" |
| 含数学公式 | 混合 + 公式 | --hybrid docling-fast --hybrid-mode full |
| 图表需要描述 | 混合 + 图片描述 | --enrich-picture-description --hybrid-mode full |
保留标题层级、表格结构、列表嵌套,适合直接用于 chunking。
{
"pages": [{
"page_number": 1,
"elements": [{
"type": "heading",
"text": "...",
"bbox": [x0, y0, x1, y1],
"level": 1
}, {
"type": "table",
"bbox": [x0, y0, x1, y1],
"html": "..."
}]
}]
}
每个元素都有 bbox 坐标,方便做源码溯源。
保留布局结构,适合渲染或进一步处理。
convert() 调用会启动一个新的 JVM 进程,所以批量文件建议一次传入,而不是循环多次调用opendataloader-pdf-hybrid --port 5002,然后客户端加 --hybrid docling-fast--enrich-formula 或 --enrich-picture-description 必须在混合服务器和客户端都加 --hybrid-mode full,否则强化功能静默跳过npm run sync,它会重新生成 options.json 和所有 Python/Node.js 绑定| 引擎 | 综合分 | 表格 | 速度(秒/页) |
|---|---|---|---|
| opendataloader(混合) | 0.90 | 0.93 | 0.43 |
| docling | 0.86 | 0.89 | 0.73 |
| marker | 0.83 | 0.81 | 53.93 |
| mineru | 0.82 | 0.87 | 5.96 |
| pymupdf4llm | 0.57 | 0.40 | 0.09 |
pip install opendataloader-pdfnpm install @opendataloader/pdforg.opendataloader:opendataloader-pdf-core