word-wzq · Word(.docx) 多模态教学知识库自动化构建
把 Word 讲义/教材文稿自动转化为可检索、可复用、可再加工的多模态教学知识库: 节级文本 + 公式 LaTeX + 图片集 + 图片 AI 理解 + 教材文案 + 图文绑定 JSON。 与 pptx-wzq 同构——指令、流程、产物协议完全一致。
核心方案:混合法
Word 是连续流文档、无物理页,故采用「标题层级逻辑分块 + 可选渲染定页」:
- 逻辑分块(默认):以 Heading1
9 / 标题19 样式切分「节」→ 节即伪「页」, 段落/表格/图片/公式归属最近一节;教材语义比物理页更贴切; - 渲染定页(
--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
Metadata
Release files for word-wzq 2.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| word_wzq-2.3.0.tar.gz | 70.9 kB | Without provenance | Details for word_wzq-2.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| word_wzq-2.3.0-py3-none-any.whl | Python 3 | none | any | Details for word_wzq-2.3.0-py3-none-any.whl |
Total release size: 154.5 kB
Release files / word_wzq-2.3.0.tar.gz
| Download URL | word_wzq-2.3.0.tar.gz |
|---|---|
| Size | 70.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0171bcdd283dfe7799af83d6cf32976c8ac988344149c1e84e39a5294435603e
|
|
BLAKE2b-256 checksum How to use checksums |
c0e24794e3d05ba654b304c264785afdf0a25709cef92d561bd1b1cb7bd52325
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / word_wzq-2.3.0-py3-none-any.whl
| Download URL | word_wzq-2.3.0-py3-none-any.whl |
|---|---|
| Size | 83.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8bc9a06eed7f7f5564a5b13292736cc36227a1acb3d7165500e49521ac3a6270
|
|
BLAKE2b-256 checksum How to use checksums |
856acd5531b350cd860c42295154c6f4ded154870713994b39306dad03cbe0c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Security for word-wzq 2.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.