mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
chore: remove newline character from split characters in split_model.py
This commit is contained in:
parent
71f1e26c8f
commit
ae0a34a220
|
|
@ -300,8 +300,9 @@ def smart_split_paragraph(content: str, limit: int):
|
|||
|
||||
# 优先级:句号 > 感叹号/问号 > 回车
|
||||
split_chars = [
|
||||
('。', 0), ('!', 0), ('?', 0), # 句子结束符,包含在当前段
|
||||
('\n', 0), # 回车符
|
||||
('。', 0), ('.', 0), # 中英文句号
|
||||
('!', 0), ('!', 0), # 中英文感叹号
|
||||
('?', 0), ('?', 0), # 中英文问号
|
||||
]
|
||||
|
||||
# 从后往前找分割点
|
||||
|
|
|
|||
Loading…
Reference in New Issue