We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 134c441 commit 5a1a6b4Copy full SHA for 5a1a6b4
2 files changed
jieba/__init__.py
tests/test_jieba_utils.py
@@ -1,19 +1,9 @@
1
-import jieba
2
-
3
from app.utils.jieba import cut
4
5
6
def test_cut_accepts_legacy_hmm_argument():
7
- """验证兼容封装仍支持旧 jieba.cut 的 HMM 参数名。"""
+ """验证分词封装支持旧 jieba.cut 的 HMM 参数名。"""
8
words = cut("台湾后台测试", HMM=False)
9
10
assert "".join(words) == "台湾后台测试"
11
assert "后台" in words
12
13
14
-def test_legacy_jieba_import_uses_compat_entrypoint():
15
- """验证插件仍可通过旧 jieba.cut 入口使用主程序分词实现。"""
16
- words = list(jieba.cut("台湾后台测试", HMM=False))
17
18
- assert "".join(words) == "台湾后台测试"
19
- assert "后台" in words
0 commit comments