skills/malue-ai/dazee-small/protocol-entity-extraction

protocol-entity-extraction

SKILL.md

Protocol 实体抽取

从 Protocol PDF/DOCX 中抽取 SAP 所需的全部关键实体,输出结构化 JSON。

Quick Start

from utils.document_parser import get_document_parser
parser = get_document_parser()
synopsis = await parser.parse(protocol_path, page_range=[1, 15])
stats = await parser.parse(protocol_path, page_range=[90, 115])

解析策略

多段定向解析:Synopsis(p1-15,高表格) -> Design(p30-50) -> Statistics(p90-115,纯文本) -> SAP Appendix(p240+)

解析引擎(四级降级)

DocumentParser 自动选择最优引擎:

  1. Unstructured API (云端) — 需要 UNSTRUCTURED_API_KEY,表格+OCR 最强
  2. Docling (本地 AI) — IBM 开源,视觉+语言模型做表格识别,无需 API Key,推荐本地首选
  3. pdfplumber (本地) — 文本+简单表格
  4. PyPDF2 (本地) — 仅纯文本兜底

如果 UNSTRUCTURED_API_KEY 未配置且 Docling 已安装,会自动使用 Docling(表格识别精度远高于 pdfplumber)。

References

Weekly Installs
1
GitHub Stars
31
First Seen
13 days ago
Installed on
amp1
cline1
openclaw1
opencode1
cursor1
kimi-cli1