QA: Update requirements and refactor message handling logic etc.

This commit is contained in:
晴猫
2025-05-01 05:58:18 +09:00
parent 410c02e7ee
commit 2f669c7055
25 changed files with 578 additions and 581 deletions

View File

@@ -263,7 +263,7 @@ def split_into_sentences_w_remove_punctuation(text: str) -> List[str]:
if char in separators:
# 检查分割条件:如果分隔符左右都是英文字母,则不分割
can_split = True
if i > 0 and i < len(text) - 1:
if 0 < i < len(text) - 1:
prev_char = text[i - 1]
next_char = text[i + 1]
# if is_english_letter(prev_char) and is_english_letter(next_char) and char == ' ': # 原计划只对空格应用此规则,现应用于所有分隔符