Example #1
0
def translit_pl(text, lang):
    assert lang in ('pl', 'cu', 'el')
    if lang == 'pl':
        return text
    elif lang == 'cu':
        return cu2pl(expand_cu(text))
    else:
        return el2pl(simplify_el(text))
Example #2
0
def metaphone_cu(word, **kwargs):
    word = expand_cu(word, numbers=True)
    m = re.match('[^\w]*([0-9]+)[^\w]*', word)
    if m:
        return "#" + m.group(1)
    return metaphone_generic(pairs_cu, word, 'cu', **kwargs)