Scanned Chinese PDF to Word

yanouyuan-bit/scanned-pdf-to-docx

Rebuild scanned Chinese books as structured Word documents using MinerU OCR, title mapping and proofreading against the original pages.

Материал обновлён:

Открыть на GitHub
git clone https://github.com/yanouyuan-bit/scanned-pdf-to-docx.git .claude/skills/scanned-pdf-to-docx
19Звёзды1ФоркиПоследний push репозитория

Об этом Skill

A specialized workflow for scans without a usable text layer: split the book, run MinerU OCR, map chapter titles, build DOCX, then check suspicious text against page images. The included converter contains Yijing-specific correction rules and a Windows OCR path; adapt these for another book or platform instead of treating it as a universal one-click converter.

Почему мы его выбрали

Useful for scanned Chinese and classical texts: it treats OCR correction and chapter reconstruction as reviewable steps, with explicit adaptation requirements.

Для каких задач подходит

  • Recover editable Word text from scanned Chinese or classical books.
  • Rebuild missing chapter headings and preserve a reviewed correction list.
  • Reuse existing MinerU Markdown while refining the DOCX output.

Workflow

Split and OCR

Work on manageable chapter-sized files and retain page-index metadata from MinerU.

Map titles and build Word

Create the title map and document-specific corrections, then generate DOCX from the OCR Markdown.

Proofread against scans

Find suspicious markers, inspect the corresponding original image, regenerate fixes and deliver unresolved questions with the document.

Author-maintained Skill instructions

Installation and runtime

Install the Skill instructions, then provision the documented runtime dependencies before running a task.

КомандаДля чего полезна
python scripts/convert.py part.pdf -o output.docx --md ocr.md --toc toc.pyReuse reviewed OCR Markdown and a title map.
python scripts/check.py output.docxInspect the generated document for known error markers.

Author-maintained Skill instructionsOfficial project README

Scope and practical limits

The workflow targets scanned Chinese books; PDFs with an existing clean text layer are better extracted directly. Its sample-specific corrections require adaptation.

Author-maintained Skill instructionsOfficial project README

License and source

The project is distributed under MIT. Agent subscriptions, external services and optional integrations have their own requirements.

MIT license

Перед использованием

  • Python 3.10–3.12 with MinerU, python-docx and PyMuPDF; OCR model downloads and runtime can be substantial.
  • The documented OCR environment uses Windows and PowerShell. Other platforms need path and font adjustments; --md can reuse existing OCR output.
  • Adapt the example corrections, title map and domain-specific symbols to the actual book, and review uncertain passages manually.

Поддерживаемые агенты

Claude Code

Источники и материалы

Ссылки на оригинальные материалы приведены ниже. Практические идеи предложены редакцией SkillHey.