From 5b039602cda152d24d2347a1536509a3711a144e Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Fri, 21 May 2021 08:11:58 +0000 Subject: [PATCH] using jieba.lcut --- third_party/python-pinyin/pypinyin/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/python-pinyin/pypinyin/core.py b/third_party/python-pinyin/pypinyin/core.py index 3b81820d5..14af78a44 100644 --- a/third_party/python-pinyin/pypinyin/core.py +++ b/third_party/python-pinyin/pypinyin/core.py @@ -140,7 +140,7 @@ class Pinyin(): :param hans: 分词前的字符串 :return: ``None`` or ``list`` """ - outs = list(jieba.cut(hans)) # 默认用jieba分词,从语义角度分词。 + outs = jieba.lcut(hans) # 默认用jieba分词,从语义角度分词。 return outs def post_seg(self, hans: Text, seg_data: List[Text],