SQuAD / utils /preprocess.py
tnp554's picture
feat: deploy SQuAD backend with all AI models
09daf0b
raw
history blame contribute delete
119 Bytes
import re
def tokenize(text):
text = text.lower()
text = re.sub(r"[^\w\s]", "", text)
return text.split()