From 7911e7137143ba296316db7a9910164e39a7ef28 Mon Sep 17 00:00:00 2001 From: Bakadax Date: Thu, 15 May 2025 19:42:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A6=82=E7=8E=87=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/chat/utils/utils.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/chat/utils/utils.py b/src/chat/utils/utils.py index e6c22a89..18542f9f 100644 --- a/src/chat/utils/utils.py +++ b/src/chat/utils/utils.py @@ -366,9 +366,12 @@ def split_into_sentences_w_remove_punctuation(text: str) -> list[str]: if not preliminary_final_sentences: return [] - if len_text < 12: split_strength = 0.2 - elif len_text < 32: split_strength = 0.5 - else: split_strength = 0.7 + if len_text < 12: + split_strength = 0.5 + elif len_text < 32: + split_strength = 0.7 + else: + split_strength = 0.9 merge_probability = 1.0 - split_strength if merge_probability == 1.0 and len(preliminary_final_sentences) > 1: