def clean_format_str(text):
    """Cleans unicode control symbols, non-ascii chars, and extra blanks."""
    text = "".join(ch for ch in text if unicodedata.category(ch)[0] != "C")
    text = "".join([c if ord(c) < 128 else "" for c in text])
    text = clean_spaces(text)
    return text
Cleans unicode control symbols, non-ascii chars, and extra blanks.
markuplm/examples/fine_tuning/run_swde/prepare_data.py