skillfed

ocr_kb

ocr_kb processes PDF documents page-by-page using multimodal models to extract text, LaTeX formulas, and independent research figures with global numbering. It generates incremental DOCX output with quality checkpoints every two pages, supports environment cleanup and partial reruns, and maintains progress through checkpoint files for reliable recovery.

ocr_kb extracts text, formulas, and figures from PDF pages using multimodal AI with checkpoint-based recovery.

AI-generated summary based on this skill's SKILL.md

247 14 MIT updated by TFboy1

Install

TFboy1/academic-paper-writer/ocr_kb · repository language: Python

CLI (skillfed)coming soon
git clone https://github.com/TFboy1/academic-paper-writer
cp -r academic-paper-writer/ocr_kb ~/.claude/skills/ocr_kb

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How does ocr_kb extract text, formulas, and figures from PDF pages?

ocr_kb uses multimodal AI models to process PDF documents page-by-page, extracting text, LaTeX formulas, and independent research figures. The skill applies global numbering to equations, figures, and tables, then generates incremental DOCX output with quality checkpoints every two pages for reliable document digitization.

Can ocr_kb convert scanned or image-based PDFs to formatted DOCX documents?

Yes. ocr_kb converts scanned papers and image-based PDFs to formatted DOCX output by extracting all content through multimodal processing. It applies IEEE/APA formatting and typesetting automatically, preserving formulas, figures, and tables with proper global numbering in the final Word document.

What happens if document processing is interrupted—can ocr_kb resume?

ocr_kb maintains checkpoint files to enable recovery from interruptions. If processing stops mid-document, you can resume from the last checkpoint without reprocessing completed pages. The skill supports environment cleanup and partial reruns, allowing efficient continuation of long document workflows.

Does ocr_kb extract LaTeX equations from paper images?

Yes. ocr_kb extracts LaTeX equations directly from paper images and PDF pages using its multimodal model. Extracted formulas are preserved in the output DOCX with proper formatting and integrated into the global equation numbering system for scientific document workflows.

How does ocr_kb handle figures and tables in multi-page documents?

ocr_kb identifies and extracts independent research figures and tables from each page, assigning them global numbering across the entire document. All extracted figures, tables, and equations are organized with IEEE/APA formatting in the incremental DOCX output, maintaining cross-reference integrity.

What quality assurance does ocr_kb provide during batch processing?

ocr_kb generates quality checkpoints every two pages during batch processing to verify extraction accuracy. Combined with checkpoint recovery, this ensures reliable page-by-page digitization of long documents. Progress is tracked through checkpoint files, enabling safe partial reruns and environment cleanup without data loss.

SKILL.md

rendered from the published skill — quoted content, verbatim

论文排版与整理完全工作流 (Iterative OCR & Typesetting Pipeline)

0. 目录规范 (Directory Convention)

所有中间文件和最终产物必须严格遵守以下目录结构,禁止在项目根目录下放置任何生成文件

项目根目录/
├── resources/
│   ├── pages/          # 切分出的单页 PNG 图片
│   ├── figures/        # 从页面中裁剪出的独立科研配图(全局编号)
│   ├── md/             # 每页的 Markdown 提取结果 (page_1.md, page_2.md, ...)
│   ├── scripts/        # 所有 Python 辅助脚本(可跨任务复用,清理时不删除)
│   ├── compiled_paper.md  # 最终汇总的完整 Markdown
│   ├── config.json     # 任务配置(源 PDF、格式规范),整个任务期间不变
│   └── checkpoint.json # 运行时进度(当前页、计数器、失败页),随处理更新
├── outputs/
│   ├── <name>_checkpoint_p<N>.docx   # 核查点中间版本
│   └── <name>_final_<date>.docx      # 最终交付版本
├── ocr_kb/
│   └── SKILL.md        # 本文件
└── <source>.pdf        # 用户提供的原始 PDF

0.5 resources/config.json 规范 (Task Configuration)

在每次新任务启动时创建,整个任务期间不修改。续作时直接读取。所有管道共用同一 schema。

```json { "source_file": "2103.10360v2.pdf", "source_type": "pdf",

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 3 files
ocr_kb/SKILL.md
ocr_kb/scripts/latex_to_omml.py
ocr_kb/scripts/page_to_image.py

Related skills

Tags

document-digitization formula-extraction batch-processing checkpoint-recovery figure-cropping format-conversion quality-verification latex-support workflow-automation incremental-generation