第 1 卷三集全部转为成稿(分块扩写 + AI 腔定点返修),文档同步
- 每集两稿:NNN-….md 为成稿(9492/11260/11869 字),NNN-….skeleton.md 为过闸门的骨架稿 - 新增 expand.repair_style:只重写含 AI 腔标记的段落(本例出现了 14 处破折号), 三集硬伤密度 1.2/1.0/1.5 → 0.1/0.3/0.0(每千字) - episode 命令接入定点返修;expand 命令保留 A/B 对照用法 - README 同步文笔层、本土化、子命令、以及本轮新踩的坑(\b 盲点、枚举大小写、自制小节标记) - 第 3 集骨架连换三条线索仍未过闸门(真实拒绝),其成稿基于既有骨架扩写
This commit is contained in:
@@ -212,6 +212,8 @@ def _expand_in_place(volume: int, world: legends.World, produced, args) -> str:
|
||||
for note in fixed.notes:
|
||||
print(" " + note)
|
||||
|
||||
text = _polish(text, world, produced.selection.thread, produced.episode, args.model)
|
||||
|
||||
produced.path.write_text(text.strip() + "\n", encoding="utf-8")
|
||||
remaining = factcheck.check(text, world)
|
||||
print(expand_mod.compare(produced.text, text))
|
||||
@@ -221,6 +223,20 @@ def _expand_in_place(volume: int, world: legends.World, produced, args) -> str:
|
||||
return text
|
||||
|
||||
|
||||
def _polish(text: str, world, thread, episode, model: str, max_rounds: int = 2) -> str:
|
||||
"""定点返修 AI 腔标记(破折号、「不是A而是B」等),只改命中的段落。"""
|
||||
for round_no in range(1, max_rounds + 1):
|
||||
if not expand_mod.style_targets(text):
|
||||
return text
|
||||
result = expand_mod.repair_style(world, thread, episode, text, model=model)
|
||||
for note in result.notes:
|
||||
print(f" (第 {round_no} 轮){note}")
|
||||
if result.text == text:
|
||||
return text
|
||||
text = result.text
|
||||
return text
|
||||
|
||||
|
||||
def cmd_episode(args: argparse.Namespace) -> int:
|
||||
world, found = _load_candidates(args)
|
||||
state = chronicle.State.load()
|
||||
|
||||
Reference in New Issue
Block a user