Pachinee commited on
Commit
867e2ea
·
verified ·
1 Parent(s): 109d1d4

Create preprocess.py

Browse files
Files changed (1) hide show
  1. utils/preprocess.py +6 -0
utils/preprocess.py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ import re
2
+
3
+ def preprocess_text(text: str) -> str:
4
+ text = text.strip()
5
+ text = re.sub(r"\s+", " ", text)
6
+ return text