Quizify / backend /utils /text_utils.py
hetsheta's picture
Initial Commit
0481fba
Raw
History Blame Contribute Delete
177 Bytes
import re
def normalize_answer(text: str):
if not text:
return ""
text = text.lower()
text = re.sub(r"[^\w\s]", "", text)
return " ".join(text.split())