跳到正文
Skillpedia
PDF、Word 与幻灯片12k · #11572

ocr-and-documents

它能做什么

该技能从普通阅读无法处理的扫描件和基于图像的文档中提取文字。适用于需要恢复纸质文档或扫描 PDF 中文字的人。

适用场景

  • ✓当你有一份扫描的 PDF,需要把它的文字变成可搜索的文档时。
  • ✓当你有一张文档照片,想把其中的文字复制出来时。
  • ✓当排版复杂、含有表格或数学公式的文档需要转换为结构化文字时。

技能链接

https://github.com/EKKOLearnAI/ekko-studio/blob/main/packages/ekko-agent/skills/ocr-and-documents/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/EKKOLearnAI/ekko-studio/blob/main/packages/ekko-agent/skills/ocr-and-documents/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“这份合同的扫描 PDF 无法选中文字。你能帮我提取文字吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会先尝试普通提取,然后在使用较重的版面工具之前,先使用较轻量的本地 OCR 工具。除非你允许上传,否则它会把文件保留在你的电脑上。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

OCR and scanned documents

Use this Skill when ordinary document extraction fails because the source is scanned, image-based, or layout-heavy.

Start here

Call skill_view for this Skill and use its returned baseDirectory. Helpers live in <baseDirectory>/scripts.

Prefer local processing. Do not upload a private document to an external OCR service unless the user explicitly authorizes that transfer.

Choose the lightest path

  1. Normal extraction first. For PDFs, try the bundled pdf Skill. For .docx, use docx. Do not OCR born-digital text.
  2. A few scanned pages. Render pages with the pdf Skill and inspect images using view_image; transcribe only the requested pages.
  3. Text-oriented scanned PDF. Try extract_pymupdf.py; this is the lighter local path.
  4. Complex layout, tables, math, or many scanned pages. Use extract_marker.py only after confirming the need and checking resources.

Helpers

python3 <baseDirectory>/scripts/extract_pymupdf.py input.pdf -o extracted.md
python3 <baseDirectory>/scripts/extract_marker.py --check
python3 <baseDirectory>/scripts/extract_marker.py input.pdf -o extracted.md

Run helpers with terminal_exec, using python3 as the command and arguments as an array. Use --help for exact options.

extract_pymupdf.py requires PyMuPDF:

python3 -m pip install pymupdf

Its --markdown mode additionally requires pymupdf4llm.

extract_marker.py uses marker-pdf, which can require several gigabytes of packages and model downloads. Never install it automatically. Check available disk space and ask the user before installing or downloading large models.

URLs

If the source is a URL, first use an available browser or HTTP tool to identify whether it points to HTML or a document. Download only the requested document, respect authentication and access boundaries, and then process the local copy. Do not assume a specific web tool exists.

Verification

  • Preserve reading order, page references, headings, tables, footnotes, and confidence caveats.
  • Compare extracted text against representative rendered pages with view_image.
  • Mark uncertain characters and fields instead of guessing.
  • For tables, verify column alignment and numeric values separately.
  • Return both the extracted artifact path and the original source/page mapping when possible.
常见问题

我的文档会被发送到在线服务吗?

不会。该技能优先在本地处理,除非你明确允许,否则不会上传私人文档。

什么时候不应该使用 OCR?

对于基于文字的 PDF 或 Word 文件,普通提取已经能工作,因此不需要 OCR。

什么时候会使用较重的工具?

只有在智能体确认需要它,并检查电脑有足够资源之后,才会使用。

详情

作者的原始描述

Extract and structure text from scanned PDFs and document images with a local-first OCR workflow, layout-aware fallbacks, and explicit heavyweight dependency controls.

repo: EKKOLearnAI/ekko-studio

热度

GitHub 星标
12k
排名
#11572
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能