Irish lowercase with ICU
Case folding in Irish is odd; ICU can be used from most languages
import icu
def transliterator_from_rules(name, rules):
fromrules = icu.Transliterator.createFromRules(name, rules)
icu.Transliterator.registerInstance(fromrules)
return icu.Transliterator.createInstance(name)
irishlc_rules = """
:: NFD;
$uvowel=[AEIOU];
$wb=[^[:L:][:M:]];
$wb { ([nt]) } $uvowel → $1 '-';
:: lower;
:: NFC;
"""
irishlc = transliterator_from_rules('irishlc', irishlc_rules)
irishlc.transliterate("tá an tUachtarán tar éis a lámh a chur leis")