SkazuHD's picture
init space
d660b02
raw
history blame
161 Bytes
import re
def clean_text(text: str) -> str:
text = re.sub(r"[^\w\s.,!?]", " ", text)
text = re.sub(r"\s+", " ", text)
return text.strip()