Spaces:
Runtime error
Runtime error
import re | |
def normalize_text(s): | |
s = str(s) | |
# if not s.isupper(): | |
# s = re.sub(r"(\w)([A-Z])", r"\1 \2", s) # Respace | |
s = re.sub(r'\(.*\)', '', s) # Remove japanese brackets | |
s = re.sub(r'\(.*\)', '', s) # Remove english brackets | |
s = s.strip() | |
s = s.replace(' ', '_') | |
s = s.upper() | |
return s |