Spaces:
Build error
Build error
File size: 199 Bytes
dda3dc2 | 1 2 3 4 5 6 7 8 | import re
def clean_text(text: str) -> str:
text = text.lower()
text = re.sub(r"\[\*\*.*?\*\*\]", "", text) # remove PHI
text = re.sub(r"\n+", " ", text)
return text.strip()
|