mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: jieba 分词使用全模式 (#2813)
This commit is contained in:
parent
ecd5fafbaa
commit
5e43bb9d2a
|
|
@ -78,11 +78,11 @@ def get_key_by_word_dict(key, word_dict):
|
|||
|
||||
def to_ts_vector(text: str):
|
||||
# 分词
|
||||
result = jieba.lcut(text)
|
||||
result = jieba.lcut(text, cut_all=True)
|
||||
return " ".join(result)
|
||||
|
||||
|
||||
def to_query(text: str):
|
||||
extract_tags = jieba.lcut(text)
|
||||
extract_tags = jieba.lcut(text, cut_all=True)
|
||||
result = " ".join(extract_tags)
|
||||
return result
|
||||
|
|
|
|||
Loading…
Reference in New Issue