Description
There are multiple clients that want to use public ICU API for transliteration and segmentation due to its prevalence in the industry => users wouldn't have to migrate code, just build rules and dependencies. These clients would like to provide their own implementation for some of the language pairs.
Our implementation should allow for:
- ICU4X not depending on external implementations
- ICU4X should expose API for implementers to bind to (abstract class comes to mind in Java/C++)
- It should be possible for implementer to point ICU4X build to the new dependency (or to expect external linkage to happen at some point).
For example, there are teams that specialize in ML models for language pair transliteration, esp Indic languages <-> Romanization, that do much better job than rule or dictionary based solutions. They would override some pairs with their solution, but fall back to our general approach for others. Similar problems are present for segmentation, and maybe other APIs.
This is similar to Budou/X issue #1803 - how do we include it into ICU4X without depending on it, and making it a special case.