From 48e060aa5312723d28e26446fc86f05e7ffb2e75 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Fri, 15 Nov 2024 13:19:07 +0800 Subject: [PATCH] rm es query escape chars (#3428) ### What problem does this PR solve? ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/nlp/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rag/nlp/query.py b/rag/nlp/query.py index 8b1400c31..9a6ecec2d 100644 --- a/rag/nlp/query.py +++ b/rag/nlp/query.py @@ -66,7 +66,7 @@ class FulltextQueryer: def question(self, txt, tbl="qa", min_match:float=0.6): txt = re.sub( - r"[ :\r\n\t,,。??/`!!&\^%%]+", + r"[ :\r\n\t,,。??/`!!&\^%%()^]+", " ", rag_tokenizer.tradi2simp(rag_tokenizer.strQ2B(txt.lower())), ).strip()