Skip to content

词光 · Word Atlas — Illustrated IELTS vocabulary with 7,298 words, UK/US audio and FSRS review. Open-source app + CC BY 4.0 dataset.

1.7 KB
Raw Blame

内容生成流程 / Content pipeline

所有脚本在 scripts/atlas/,凭据只从环境变量或仓库外目录读取(见 SECURITY.md)。中间产物写入被 Git 忽略的 .local/forge/,可断点续跑。

  1. 词头:.local/forge/headwords.json,每项 {hid, word, raw}。raw 是可选的义项提示,只用于判断哪些义项重要,不会被复制进输出。
  2. 词条文本 gen_text.py:每批 10 个词,按 gen_text.py 中的编写规范(准确优先、原创、两类例句、不编造词源、安全中立)生成 JSON。
  3. 插画 gen_images.py:每个词条自带一个场景描述 scene,与统一画风提示词组合后生成 1024px 图片,压缩为 768px WebP 母版。按学习路线顺序生成。
  4. 发音 gen_word_audio.py:ElevenLabs,英音 Alice、美音 Sarah。
  5. 例句朗读 gen_sentence_audio.py:为 ex[0] 合成朗读,按学习路线顺序。
  6. 编译 build_atlas.py:清洗字段、排序、切块,生成 public/atlas/ 与 data/。
  7. 校验 npm run check:atlas:结构、顺序、引用与媒体文件存在性。
export SUB2_BASE_URL=... SUB2_API_KEY=... ELEVENLABS_API_KEY=...
python3 scripts/atlas/gen_text.py --workers 8
python3 scripts/atlas/gen_images.py --workers 8 --follow
python3 scripts/atlas/gen_word_audio.py
python3 scripts/atlas/gen_sentence_audio.py --follow
python3 scripts/atlas/build_atlas.py
npm run check:atlas

SUB2_BASE_URL 指向任意 OpenAI 兼容的接口。

质量边界

自动校验覆盖结构、字段、顺序和文件,不覆盖语义正确性。插画和例句没有逐条人工审校;发现问题请提 Issue 或 PR。