cxd 9 сар өмнө
parent
commit
b7a977c3a3

+ 1 - 0
backend/Service/service_utils/pdf_utils/nlp_Processor.py

@@ -39,6 +39,7 @@ class NLPInterface(ABC):
         Returns:
             int: 句子的大小。
         """
+        text = re.sub(r'[0-9.,\/#!$%\^&\*;:{}=\-_`~()•\s\\n\\t\(\)]+', '', text)
         if re.match(r'[\u4e00-\u9fa5]+', text):
             return len(text)
         else: