cxd il y a 9 mois
Parent
commit
b7a977c3a3
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      backend/Service/service_utils/pdf_utils/nlp_Processor.py

+ 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: