Comment
Comment by docheinestages
This is exactly what language models are good at. It's not a problem that could be solved purely deterministically, because it requires knowledge of the actual pronunciation in that particular language or dialect. There can be so many exceptions to the rule, so it's just easier to train a small language model on a sufficiently large dataset.