import unicodedata
import re


def get_comparison_string(s):
    """Given a string or unicode, returns a simplified lowercase whitespace-free ASCII string.
    Used to compare slightly different versions of the same thing, which may differ in case,
    spacing, or use of accents."""
    nkfd_form = unicodedata.normalize('NFKD', str(s).lower())
    s = ''.join([c for c in nkfd_form if not unicodedata.combining(c)])
    s = re.sub(r'[^a-zA-Z0-9]', '-', s)
    return re.sub(r'--+', '-', s)