Skip to content

Commit ae0a34a

Browse files
committed
chore: remove newline character from split characters in split_model.py
1 parent 71f1e26 commit ae0a34a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

apps/common/utils/split_model.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,9 @@ def smart_split_paragraph(content: str, limit: int):
300300

301301
# 优先级:句号 > 感叹号/问号 > 回车
302302
split_chars = [
303-
('。', 0), ('!', 0), ('?', 0), # 句子结束符,包含在当前段
304-
('\n', 0), # 回车符
303+
('。', 0), ('.', 0), # 中英文句号
304+
('!', 0), ('!', 0), # 中英文感叹号
305+
('?', 0), ('?', 0), # 中英文问号
305306
]
306307

307308
# 从后往前找分割点

0 commit comments

Comments
 (0)