Skip to main content

word-wzq · Word(.docx) 多模态教学知识库自动化构建

把 Word 讲义/教材文稿自动转化为可检索、可复用、可再加工的多模态教学知识库: 节级文本 + 公式 LaTeX + 图片集 + 图片 AI 理解 + 教材文案 + 图文绑定 JSON。 与 pptx-wzq 同构——指令、流程、产物协议完全一致。

核心方案:混合法

Word 是连续流文档、无物理页,故采用「标题层级逻辑分块 + 可选渲染定页」:

  1. 逻辑分块(默认):以 Heading19 / 标题19 样式切分「节」→ 节即伪「页」, 段落/表格/图片/公式归属最近一节;教材语义比物理页更贴切;
  2. 渲染定页(--render-pages 增强):LibreOffice/Word 导出 PDF 后映射物理页码, 用于与「PPTX 转 PDF」对齐或人工核对。

安装

pip install word-wzq
pip install "word-wzq[render]"   # 混合法增强:物理页码映射

快速开始

# 一条命令完整流水线(自动装依赖 / 引导 Key / 预估 Token / 确认执行)
word-paser 模拟电子技术讲义.docx -o 讲义输出

# 结果目录:images/ + <名>_captions.md + <名>_textbook.md + <名>_binding.json

# 分步执行
word-text 讲义.docx -o out
word-formula 讲义.docx -o out
word-img 讲义.docx -o out
word-caption out/images -o cap.md --texts out/texts.md --formulas out/formulas.md
word-author --texts out/texts.md --formulas out/formulas.md --captions cap.md -o textbook.md
word-bind out -o binding.json --textbook textbook.md --images-dir out/images

指令一览

命令 功能 模型 Token
word-text 节级文本/表格提取(标题层级逻辑分块) 0
word-formula 三路径公式→LaTeX(OMML/EQ3/OCR) 0
word-img 节级图片提取+过滤+EMF/WMF 渲染 0
word-caption 图片 AI 解读(文档上下文模式) qwen3.7-plus
word-author 教材文案(学科推断+分批) deepseek-v4-flash
word-bind 节级图文绑定 JSON 0
word-paser 整体编排(混合法)

作者

吴振谦 · wuzhenqian@nbu.edu.cn · QQ:38328063

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

word_wzq-1.0.1.tar.gz (42.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

word_wzq-1.0.1-py3-none-any.whl (51.0 kB view details)

Uploaded Python 3

File details

Details for the file word_wzq-1.0.1.tar.gz.

File metadata

  • Download URL: word_wzq-1.0.1.tar.gz
  • Upload date:
  • Size: 42.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for word_wzq-1.0.1.tar.gz
Algorithm Hash digest
SHA256 af97124cd3572c624c4cfecd25461c1b790e8cb9994739f7c8e4de6f6f9cb56b
MD5 d12a9a84e638b4ef5dbf6e1eec73a410
BLAKE2b-256 415ebd7baff8325b5f8a7ccc66dd5634cf7846e781741d3c2ad86aa58312a187

See more details on using hashes here.

File details

Details for the file word_wzq-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: word_wzq-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 51.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for word_wzq-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5628936e6dfe3b25e8a10d4bfcf6d157fcf4f7a41f38eafed5a76950c541cdce
MD5 a895abd734d094fe95df34948e11b8ad
BLAKE2b-256 91f6d4a4c8e15b411daad3399c9b12c2b991c2534a066ff44a9f0b240536612d

See more details on using hashes here.

Release history Release notifications | RSS feed

2.3.0

2 files

2.2.0

2 files

2.1.0

2 files

2.0.0

2 files

1.0.3

2 files

1.0.2

2 files

This release

1.0.1 This release

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page