Normalizes a string to encompass various things humans tend to get wrong:

    - Put everything lowercase
    - Drop accents
    - Transform all whitespaces sequences into a single space
    - Remove spaces before and after punctuation

def normalize(string: Text) -> Text:
    """
    Normalizes a string to encompass various things humans tend to get wrong:

    - Put everything lowercase
    - Drop accents
    - Transform all whitespaces sequences into a single space
    - Remove spaces before and after punctuation
    """

    string = string.lower()
    string = unidecode(string)
    string = RE_WHITESPACES.sub(' ', string).strip()

    return string