From 2079ad152751576908717cbd490ff2fbd89adfba Mon Sep 17 00:00:00 2001 From: "Li, Sheng-Wei" Date: Mon, 11 Dec 2023 17:39:24 +0800 Subject: [PATCH] Update delimiter list in preprocess_input_text function --- app/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/app.py b/app/app.py index 64f18d6..7c16ad4 100644 --- a/app/app.py +++ b/app/app.py @@ -213,7 +213,7 @@ async def query(input_text): def preprocess_input_text(input_text: str): input_text = re.sub(r"https?://\S+|www\.\S+", "", input_text) input_text = input_text.strip(" ,。,.\n") - parts = re.split(r'(\s*[ ,。\n]\s*)', input_text) + parts = re.split(r'(\s*[ ,。?;,.\n]\s*)', input_text) text_list = parts[::2] delimiter_list = parts[1::2]