Skip to content

Commit ba54cd7

Browse files
committed
fix: jieba 分词使用全模式
1 parent 76d050b commit ba54cd7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/common/util/ts_vecto_util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ def get_key_by_word_dict(key, word_dict):
7878

7979
def to_ts_vector(text: str):
8080
# 分词
81-
result = jieba.lcut(text)
81+
result = jieba.lcut(text, cut_all=True)
8282
return " ".join(result)
8383

8484

8585
def to_query(text: str):
86-
extract_tags = jieba.lcut(text)
86+
extract_tags = jieba.lcut(text, cut_all=True)
8787
result = " ".join(extract_tags)
8888
return result

0 commit comments

Comments
 (0)