Spaces:
Sleeping
Sleeping
| import re | |
| def clean_text(text): | |
| text = text.lower() | |
| text = re.sub(r"\n+", " ", text) | |
| text = re.sub(r"\s+", " ", text) | |
| return text.strip() | |
| import re | |
| def clean_text(text): | |
| text = text.lower() | |
| text = re.sub(r"\n+", " ", text) | |
| text = re.sub(r"\s+", " ", text) | |
| return text.strip() | |