fix(yoga): Chinese combination text from a Chinese source, not 未判定 (#91 fix2 F3, BUG-1418)
Removing the English-to-Chinese back-translation left every BVR semantic note and every yogas_doshas raj/dhana "H*_Lord(...) in H*" sentence as 未判定 in the Chinese yoga table and pages. - yoga_engine: semantic conditions return BiText(Chinese, old note). The Chinese comes from references/yoga_semantic_notes_zh.json, one sentence per note, so dedup keeps the same equality classes. English-only custom templates get the same lookup. combination_en is unchanged. - yogas_doshas: raj/dhana rows add combination_zh; combination is unchanged. - chinese_combination prefers a clean combination_zh. Which yogas fire, their strength and category are unchanged (fictional charts 0-19, same rows as staging; only set-iteration order differs). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HwMNZEzdzmrbPhuRNmZe3C
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
00c2b4d498
commit
ac3dccbac8
@@ -647,6 +647,10 @@ def chinese_yoga_label(item: dict) -> str:
|
||||
|
||||
def chinese_combination(item: dict) -> str:
|
||||
"""Use the Chinese combination sentence. An English sentence is not translated word by word."""
|
||||
authored = str(item.get("combination_zh") or "").strip()
|
||||
if authored and re.search(r"[一-鿿]", authored) and not _has_prose_glue(authored):
|
||||
# Written in Chinese by the detector itself (yogas_doshas raj / dhana rows).
|
||||
return authored
|
||||
combination = str(item.get("combination") or "").strip()
|
||||
han = bool(re.search(r"[\u4e00-\u9fff]", combination))
|
||||
function = bool(_HAN_FUNCTION_RE.search(combination)) if combination else False
|
||||
|
||||
Reference in New Issue
Block a user