Diacritic restoration is a term for guessing the original form of a text, after it's been converted to ASCII in a lossy way. In Lingála, for example, writing in ASCII merges two pairs of vowels and removes all tone markings: the words mɔ́tɔ "fire" and moto "person" aren't distinguished at all. (It doesn't always involve diacritics, as with the vowel letters here, but the name has stuck.)
The only diacritic restoration programs I've found for Lingála use a very simple statistical analysis: ASCII "moto" corresponds to moto more often than mɔ́tɔ, therefore all instances of "moto" are restored as moto. But this isn't particularly satisfying: tones and vowel qualities separate thousands of minimal pairs in Lingála (for instance, certain verb tenses are distinguished only by tone).
Are there systems out there, for Lingála or other languages, which can take context into account? What are the best models currently used? In other words, what's the state of the art here?