Browse Source

change on cleaning process befor inference

Mohidul Islam 5 năm trước cách đây
mục cha
commit
9529b72edc
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      nlu_job/nlu_utils.py

+ 1 - 1
nlu_job/nlu_utils.py

@@ -29,7 +29,7 @@ def clean_text(text):
     text = re.sub(r':\s*', ' ', text)
     text = re.sub(r':\s*', ' ', text)
     text = re.sub(r'&', ', ', text)
     text = re.sub(r'&', ', ', text)
     text = re.sub(r'/', ', ', text)
     text = re.sub(r'/', ', ', text)
-    text = re.sub(r'\.*\n\.*', '.', text)
+    text = re.sub(r'\.*\n\.*', ', ', text)
     text = re.sub(r'[dD][rR](\.|\s*)*', 'Dr. ', text)
     text = re.sub(r'[dD][rR](\.|\s*)*', 'Dr. ', text)
     return text
     return text