v0.6-wip: Python-based Phase 4 translation pipeline

架构变更:把 dr-translator 从 opencode agent 降级为 Python 脚本编排下的 LLM
调用。根本原因是 agent 一次性处理 19k 英文词整文,单次 output token 接近
Sonnet 4.6 上限(~32k),多次重跑都卡在同一个坑里——问题是架构本身,不是
prompt。

新架构:

scripts/lib/zenmux_client.py     HTTP 客户端,指数退避重试、token 统计
                                  JSONL 日志、secrets.env 自动加载
scripts/lib/markdown_chunker.py   按 H1/H2 切块,稳定 anchor ID(order+title
                                  sha1),支持合并/统计
scripts/prompts/translate_system.txt  英译中 prompt,用自定义 <<<TRANSLATION>>>
                                       分隔符格式(规避 Markdown-in-JSON 问题)
scripts/prompts/polish_system.txt     中文润色 prompt(留给下一步 polish.py)
scripts/translate.py              主入口:章节级切块 → 逐块翻译 → 拼接

关键设计:
- 0 依赖 LLM 遵从性:Python 控制切块/循环/重试,LLM 只做单块翻译
- 断点续传:每块翻译完立即写 phase4/zh_chunks/<order>-<anchor>.md
- 术语表累积:每块的 glossary_patch 合并回 phase4/glossary.json
- 失败隔离:单块失败不影响其他块,重跑只补缺
- 调试友好:--only N,M / --limit K / --force

实测(dual-target-rnai-pipeline-2026):
- 63 块全部成功,17 分钟,$1.70
- 33,441 中文字(符合"研究类 ≥30,000 字"硬标准)
- 310 条双语术语
- 翻译质量:接近母语咨询分析师写作

下一步:polish.py(按 H2 section 润色)、merge_chapters.py(从 phase2/drafts
合并生成 final_en.md)、重构 dr-editor-in-chief 调度脚本、更新 /dr-finalize。

Co-authored-by: User <human>
This commit is contained in:
kai
2026-04-22 10:43:43 +08:00
co-authored by User <human>
parent 701bc1887e
commit 1b47b50d3c
74 changed files with 2792 additions and 3 deletions
@@ -0,0 +1,312 @@
{
"2'-F-CTP": "2'-F-CTP",
"2'-F-UTP": "2'-F-UTP",
"2'-OMe-ATP": "2'-OMe-ATP",
"2'-OMe-UTP": "2'-OMe-UTP",
"2'-acetal levulinic ester (ALE) phosphoramidite": "2'-缩醛乙酰丙酸酯(ALE)亚磷酰胺",
"32P-end-labeling": "32P末端标记",
"500 Å pore": "500 Å孔径",
"AGT": "AGT",
"AJIPHASE®": "AJIPHASE®",
"ANGPTL3": "ANGPTL3",
"AOF formulation": "无动物及人源成分(AOF)配方",
"API sameness": "API同一性",
"APOC3": "APOC3",
"ASCVD": "动脉粥样硬化性心血管疾病",
"ASGPR": "去唾液酸糖蛋白受体",
"ASMF": "ASMF备案",
"Adaptive Laboratory Evolution": "适应性实验室进化",
"Ajinomoto Bio-Pharma Services": "味之素生物制药服务",
"Ajinomoto OmniChem": "Ajinomoto OmniChem",
"Amide linker": "酰胺接头",
"Angiotensinogen": "血管紧张素原",
"Antibody-Drug Conjugate": "抗体偶联药物",
"BD value": "BD交易价值",
"BIOSECURE Act": "《生物安全法案》",
"BTT activation": "BTT活化",
"Bachem": "Bachem",
"BeBetter Med": "必贝特",
"Beyotime": "碧云天",
"Biologics License Application": "生物制品上市许可申请",
"Biomaide": "博迈德",
"BirA/AviTag": "BirA/AviTag",
"Bis-RNAi": "Bis-RNAi",
"C5": "C5",
"CDE": "药品审评中心",
"CDMO": "合同开发与生产组织",
"CID fragmentation": "碰撞诱导解离(CID)碎裂",
"CLEA-LentiKats lipase formulation": "CLEA-LentiKats脂肪酶制剂",
"CMC development timeline": "CMC开发周期",
"CPG support": "CPG载体",
"CTA": "临床试验申请",
"Calantha™": "Calantha™",
"Calf Intestinal Alkaline Phosphatase": "小牛肠碱性磷酸酶",
"Candida antarctica lipase B": "南极假丝酵母脂肪酶B",
"Category I": "第I类",
"Category II": "第II类",
"Category III": "第III类",
"Category IV": "第IV类",
"ChemGenes": "ChemGenes",
"Chinese IND": "中国IND",
"Class 3": "第3类",
"Complement Factor B": "补体因子B",
"Complete Response Letter": "完全答复函",
"Controlled pore glass": "受控孔径玻璃",
"Cross-Linked Enzyme Aggregates": "交联酶聚集体",
"CuAAC": "铜催化叠氮-炔烃环加成",
"D-galactosamine": "D-半乳糖胺",
"DBCO": "二苯并环辛炔(DBCO",
"DMF": "DMF备案",
"DMT-on HPLC purification handle": "DMT-on HPLC纯化把手",
"DNase I": "DNase I",
"Deep Eutectic Solvent": "深共熔溶剂",
"Dibenzocyclooctyne": "二苯并环辛炔",
"Dual-Target RNAi Drug": "双靶点RNAi药物",
"ECO GMP Manufacturing Center": "ECO GMP生产中心",
"ECO Synthesis platform": "ECO Synthesis平台",
"ECO ligase": "ECO连接酶",
"FDA/CDER": "FDA/CDER",
"Factor XI": "凝血因子XI",
"Fall Line Endurance Fund": "Fall Line Endurance Fund",
"Full-Length Product": "全长产物",
"G5 GalNAc support": "G5 GalNAc载体",
"G5 ribofuranose": "G5核糖呋喃糖",
"GDOC": "GDOC平台",
"GDOC platform": "GDOC平台",
"GEMINI™": "GEMINI™平台",
"GMP-grade QC enzyme panel": "GMP级质控酶组合",
"GT-multi-siRNA": "GT-multi-siRNA",
"GalAhead": "GalAhead™",
"GalNAc-PA": "GalNAc-亚磷酰胺(GalNAc-PA",
"GalNAc-siRNA": "GalNAc-siRNA",
"GalT": "GalT",
"GnTI": "GnTI",
"GreenLight Biosciences": "GreenLight Biosciences",
"H1 subunit": "H1亚基",
"H2 subunit": "H2亚基",
"Hongene": "兆维",
"Host-Cell Protein": "宿主细胞蛋白",
"Huntingtin": "亨廷顿蛋白",
"Hydroxyprolinol scaffold": "羟脯氨醇(tHP)骨架",
"ICH Q11 Q&A": "ICH Q11问答",
"ICH Q13": "ICH Q13",
"ICH Q2(R1)": "ICH Q2(R1)",
"ICH Q3D(R2)": "ICH Q3D(R2)",
"ICP-MS": "ICP-MS",
"IND-to-dosing gap": "IND获批与首次给药时间差",
"IVT": "体外转录",
"Just Climate": "Just Climate",
"Kd": "Kd值",
"Kinovate Life Sciences": "Kinovate Life Sciences",
"L96 ligand": "L96配体",
"LDL-C": "LDL-C",
"LGC Biosearch Technologies": "LGC Biosearch Technologies",
"Leloir glycosyltransferases": "Leloir糖基转移酶",
"Locked Nucleic Acid": "锁核酸",
"Lp(a)": "Lp(a)",
"ManII": "ManII",
"Maywavee": "迈威生物",
"MutS Homolog 3": "MutS同源物3",
"N-acetylgalactosamine": "N-乙酰半乳糖胺",
"NAG37": "NAG37",
"NDA": "新药申请",
"NMPA": "国家药品监督管理局",
"Nitto Denko Avecia": "Nitto Denko Avecia",
"NittoPhase HL": "NittoPhase HL",
"Norroa": "Norroa",
"Notice No. 21 of 2026": "2026年第21号通告",
"Nuclease P1": "核酸酶P1",
"Nucleoside Triphosphate": "核苷三磷酸",
"OPR&D": "《有机工艺研究与开发》(OPR&D",
"PCSK9": "PCSK9",
"PDE": "允许日暴露量",
"PMO synthesis": "PMO合成",
"PVA entrapment": "PVA包埋",
"Phosphodiester linker": "磷酸二酯接头",
"Polynucleotide Kinase (T4)": "多核苷酸激酶(T4",
"Poresyn Solutions": "Poresyn Solutions",
"Prime Synthesis CPG": "Prime Synthesis CPG",
"PrimeMax siRNA CPG": "PrimeMax siRNA CPG",
"Process Analytical Technology": "过程分析技术",
"Process Atlas": "工艺图谱",
"Process Mass Intensity": "工艺质量强度",
"Q3M": "Q3M",
"Q6M": "Q6M",
"QC biocatalyst": "质控生物催化剂",
"RADS™": "RADS™",
"RNA interference": "RNA干扰",
"RNA-Induced Silencing Complex": "RNA诱导沉默复合体",
"RNase A": "核糖核酸酶A",
"RNase H": "核糖核酸酶H",
"RNase Inhibitor": "RNase Inhibitor",
"RNase T1": "核糖核酸酶T1",
"RSC 2.0 modification": "RSC 2.0修饰",
"RiboGalSTAR™": "RiboGalSTAR™",
"Ribonuclease T1": "核糖核酸酶T1",
"Roche Custom Biotech": "罗氏定制生物技术",
"SBIA": "SBIA",
"SBS": "SBS",
"SMART Digest RNase T1 kit": "SMART Digest RNase T1试剂盒",
"SPOS": "固相合成(SPOS",
"ST Pharm": "ST Pharm",
"STP122G": "STP122G",
"SUGAR-TARGET glycosyl-transferase cascade": "SUGAR-TARGET糖基转移酶级联反应",
"Sangon Biotech": "生工",
"SiaT": "SiaT",
"Snake Venom Phosphodiesterase": "蛇毒磷酸二酯酶",
"Sollbruchstellen": "易断位点",
"SpyCatcher/SpyTag": "SpyCatcher/SpyTag",
"Strain-Promoted AzideAlkyne Cycloaddition": "应变促进叠氮–炔烃环加成",
"Supply-Chain Opportunity Map": "供应链机会地图",
"Suzhou Taike": "苏州泰科",
"Synthesis Modality": "合成模式",
"T4 RNA Ligase 1": "T4 RNA连接酶1",
"T4 RNA Ligase 2": "T4 RNA连接酶2",
"T7 RNA polymerase": "T7 RNA聚合酶",
"TRL": "技术成熟度",
"TRiM™": "TRiM™平台",
"Takara Bio": "宝生物工程",
"Technical Guidelines for Pharmaceutical Research on Chemically Synthesized Oligonucleotide Drugs (Innovative Drugs)": "化学合成寡核苷酸药物(创新药)药学研究技术指导原则(试行)",
"Terminal Deoxynucleotidyl Transferase": "末端脱氧核苷酸转移酶",
"Tianjin Orilife": "天津奥利法",
"Tier 1": "第一层级",
"Tier 2": "第二层级",
"Tier 3": "第三层级",
"Triazole linker": "三唑接头",
"TrisGal-6 scaffold": "TrisGal-6骨架",
"UDP-Gal": "UDP-Gal",
"UDP-GalNAc": "UDP-GalNAc",
"Unylinker-functionalized polystyrene support": "Unylinker功能化聚苯乙烯载体",
"Vazyme": "诺唯赞",
"Worthington Biochemical": "Worthington Biochemical",
"WuXi AppTec": "药明康德",
"Wuhu Huaren": "芜湖华仁",
"XBP-1": "XBP-1",
"Yeasen Biotech": "翌圣生物科技",
"acceptable daily intake": "每日可接受摄入量",
"activated-intermediate shelf life": "活化中间体货架期",
"anion-exchange polishing": "阴离子交换精制",
"antisolvent": "反溶剂",
"arm-coupling reaction": "臂偶联反应",
"atom-economy penalty": "原子经济性损失",
"avidity plateau": "亲合力平台",
"bead attrition": "微珠磨损",
"bottom-up mapping": "自下而上图谱分析",
"branching-point coupling": "分支点偶联",
"bundled enzyme-carrier product": "酶-载体捆绑产品",
"cardiometabolic disease": "心脏代谢疾病",
"cell-free synthesis": "无细胞合成",
"channeling": "沟流",
"charge-state deconvolution": "电荷态反卷积",
"chemoenzymatic": "化学酶法",
"choline chloride/glycerol": "氯化胆碱/甘油",
"choline chloride/urea (reline)": "氯化胆碱/尿素(reline",
"class extension": "品类延伸",
"clinical translation": "临床转化",
"cluster-arm variants": "簇臂变体",
"co-dosing program": "联合给药项目",
"cocktail formulation": "鸡尾酒制剂",
"complement dysregulation": "补体失调",
"continuous process verification": "连续工艺验证",
"continuous-flow microgel reactor": "连续流微凝胶反应器",
"control threshold": "控制阈值",
"convergent assembly": "汇聚式组装",
"copper scavenging": "铜清除",
"copper-residue burden": "铜残留合规负担",
"coronary heart disease": "冠心病",
"covalently-linked tandem siRNA": "共价连接串联siRNA",
"cross-activity": "交叉活性",
"denaturing IP-RP-LC-MS": "变性离子对反相液相色谱-质谱",
"dendritic scaffold": "树枝状骨架",
"design paradigm": "设计范式",
"di-valent branched construct": "二价分支构建体",
"diamine scaffold": "二胺骨架",
"disulfide bond": "二硫键",
"domestic-substitution feasibility": "国产替代可行性",
"droplet microfluidics": "液滴微流控技术",
"dsRNA": "dsRNA",
"dual-functional RNAi therapeutic": "双功能RNAi治疗药物",
"enantiomeric excess": "对映体过量值",
"enzymatic-ligation": "酶连接",
"enzyme loading per gram": "每克载体酶载量",
"fixed-bed copper-scavenging resin": "固定床铜清除树脂",
"glutaraldehyde": "戊二醛",
"glycosyl-transferase": "糖基转移酶",
"hepatic parenchymal clearance": "肝实质清除率",
"hetero-duplex": "异源双链体",
"hexaethyleneglycol": "六乙二醇",
"hexavalent GalNAc cluster": "六价GalNAc簇",
"high-load polymeric support": "高载量聚合物载体",
"homo-duplex": "同源双链体",
"hypertriglyceridemia": "高甘油三酯血症",
"immobilized enzyme": "固定化酶",
"immobilized polymerase/phosphatase reactor": "固定化聚合酶/磷酸酶反应器",
"inline conversion monitoring": "在线转化率监测",
"inter-lot specific activity variation": "批间比活力变异",
"junction-verification assay": "连接位点验证检测",
"lenticular beads": "扁豆形微珠",
"lipid nanoparticle": "脂质纳米颗粒",
"liquid-phase oligonucleotide synthesis": "液相寡核苷酸合成",
"liquid-phase synthesis": "液相合成",
"mRNAi GOLD™": "mRNAi GOLD™",
"maleimide-activated agarose": "马来酰亚胺活化琼脂糖",
"manufacturing stack": "制造体系",
"material diversion strategy": "物料转移策略",
"membrane bioreactor": "膜生物反应器",
"methacrylate copolymer beads": "甲基丙烯酸酯共聚物微珠",
"mixed hyperlipidemia": "混合型高脂血症",
"monoantennary GalNAc": "单天线GalNAc",
"monomer diversity index": "单体多样性指标",
"muRNA": "muRNA",
"multivalent GalNAc cluster": "多价GalNAc簇",
"multivalent GalNAc scaffold": "多价GalNAc骨架",
"murine TdT": "鼠源TdT",
"mxRNA": "mxRNA",
"neurodegeneration": "神经退行性疾病",
"nonclinical guidance": "非临床指南",
"nuclease mapping": "核酸酶图谱分析",
"packed-bed reactor": "填充床反应器",
"partially conjugated strand": "部分偶联链",
"particle-integrity monitoring": "颗粒完整性监测",
"pentavalent GalNAc": "五价GalNAc",
"phosphoramidite monomer": "亚磷酰胺单体",
"pipeline inflation": "管线虚胖",
"platform-multiplication event": "平台倍增事件",
"polymer microgels": "聚合物微凝胶",
"pre-validated package": "预验证文件包",
"pressure-drop effects": "压降效应",
"process debt": "工艺债务",
"process node": "工艺节点",
"process signature": "工艺特征",
"product-specific guidance": "产品专项指南",
"protecting-group strategy": "保护基策略",
"protective allele": "保护性等位基因",
"pyranose": "吡喃糖",
"qualification barrier": "资质壁垒",
"rSAP": "rSAP",
"ratio QC": "比例质控",
"receptor-mediated uptake": "受体内吞",
"regulatory vector": "监管向量",
"release-profile QC": "释放谱质控",
"residual enzyme surveillance": "残留酶监控",
"ribofuranose scaffold": "核糖呋喃糖骨架",
"serially assembled trivalent construct": "序贯组装三价构建体",
"siRELIS facility": "siRELIS工厂",
"silica bead fines": "硅胶微珠细粉",
"solid-phase phosphoramidite synthesis": "固相亚磷酰胺合成",
"solid-phase synthesis": "固相合成",
"soluble anchor": "可溶性锚定基团",
"spacer accessibility": "间隔臂可及性",
"splint removal": "DNA夹板去除",
"streptavidin-coated silica beads": "链霉亲和素包被硅胶微珠",
"structure-activity study": "构效关系研究",
"sub-saturation binding regime": "未饱和结合区间",
"supplier concentration": "供应商集中度",
"swelling index": "溶胀指数",
"tetraantennary": "四天线",
"tetraloop": "四环体",
"top-down intact-mass sequencing": "自上而下完整质量测序",
"toxicokinetic subfactor justification": "毒代动力学亚因子论证",
"triantennary GalNAc": "三天线GalNAc",
"truncated cluster impurity": "截短型簇杂质"
}