import re


def greek_to_english(string):
    """
    Converts all greek letters to the corresponding english letters.
    Useful for creating song slugs from greek song titles.
    """
    GREEK_MAP = {
        'α':'a', 'β':'b', 'γ':'g', 'δ':'d', 'ε':'e', 'ζ':'z', 'η':'h',  'θ':'th',
        'ι':'i', 'κ':'k', 'λ':'l', 'μ':'m', 'ν':'n', 'ξ':'ks', 'ο':'o', 'π':'p',
        'ρ':'r', 'σ':'s', 'τ':'t', 'υ':'y', 'φ':'f', 'χ':'x', 'ψ':'ps', 'ω':'w',
        'ά':'a', 'έ':'e', 'ί':'i', 'ό':'o', 'ύ':'y', 'ή':'h', 'ώ':'w',  'ς':'s',
        'ϊ':'i', 'ΰ':'y', 'ϋ':'y', 'ΐ':'i',
        'Α':'A', 'Β':'B', 'Γ':'G', 'Δ':'D', 'Ε':'E', 'Ζ':'Z', 'Η':'H',  'Θ':'Th',
        'Ι':'I', 'Κ':'K', 'Λ':'L', 'Μ':'M', 'Ν':'N', 'Ξ':'Ks', 'Ο':'O', 'Π':'P',
        'Ρ':'R', 'Σ':'S', 'Τ':'T', 'Υ':'Y', 'Φ':'F', 'Χ':'X', 'Ψ':'Ps', 'Ω':'W',
        'Ά':'A', 'Έ':'E', 'Ί':'I', 'Ό':'O', 'Ύ':'Y', 'Ή':'H', 'Ώ':'W',  'Ϊ':'I',
        'Ϋ':'Y'
    }

    s = "".join(GREEK_MAP.keys())

    result = ''
    for piece in re.compile('[%s]|[^%s]+' % (s,s)).findall(string):
        if piece in GREEK_MAP:
            result += GREEK_MAP[piece]
        else:
            result += piece

    return result.replace('oy', 'ou').replace('OY', 'OU').replace('Oy', 'Ou')