Spaces:
Sleeping
Sleeping
File size: 199 Bytes
d51135f |
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()
|