JumpForge-Agentic-SE-3K / src /jumpforge /normalization.py
jumplander's picture
Upload 34 files
b227dc8 verified
Raw
History Blame Contribute Delete
196 Bytes
import re
def normalize_text(text):
text = text.lower()
text = re.sub(r"\b\d+\b", "<n>", text)
text = re.sub(r"[^a-z0-9<> ]+", " ", text)
return re.sub(r"\s+", " ", text).strip()