Skip to content

Commit

Permalink
Update delimiter list in preprocess_input_text function
Browse files Browse the repository at this point in the history
  • Loading branch information
pha123661 committed Dec 11, 2023
1 parent de908d2 commit 2079ad1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 2079ad1

Please sign in to comment.