refactor(text): unify Chinese conversion on Rust (#6481)

This commit is contained in:
InfinityPacer
2026-08-27 17:17:06 +08:00
committed by GitHub
parent fcdef31ecf
commit 2b1f590c4d
12 changed files with 71 additions and 80 deletions
+6 -1
View File
@@ -1,4 +1,4 @@
from app.foundation.text import cut
from app.foundation.text import convert, cut
def test_cut_accepts_hmm_argument():
@@ -19,3 +19,8 @@ def test_cut_preserves_full_mode_contract():
"长江大桥",
"大桥",
]
def test_convert_uses_rust_mediawiki_contract():
"""标准与 free-threaded 运行时应共享同一中文转换语义。"""
assert convert("后台", "zh-hant") == "後台"