AITextDet / preprocessing.py
yadagiriannepaka's picture
Upload 4 files
49df25d verified
Raw
History Blame Contribute Delete
204 Bytes
import re
def clean_text(text):
"""
Removes special AI tags from the text.
"""
return re.sub(r'</?AI_Start>|</?AI_End>', '', text) if re.search(r'</?AI_Start>|</?AI_End>', text) else text