I thought the rule was that ligatures shouldn't cross syllable boundaries. Like the fi in "fine" can be replaced but not the fi in "barfing", so it would need to be a bit more than a lookup table. Or maybe a dictionary-sized lookup table isn't a problem anymore.