What is our API surface?
Opened this issue · 0 comments
nciric commented
We started discussing use cases and potential lexicon format in #1 . Let's move details of API design to a separate issue (this one).
From my end I see the following use cases:
- Inflecting a single word in a message format, from base form with provided grammatical information, e.g.
icu.inflect("sr-Latn", "Beograd", options { "vocative", "singular" }) -> "Beograde"
. Necessary grammatical information for "Beograd", like gender, inanimate etc, would be pulled from a lexicon. - For a given word, find its lemma and grammatical info.
- For a word not in a lexicon, try to "guess" its inflected form, based on rules and/or similarity to other words in the dictionary.
- Optional - try to align multiple related words, e.g. inflect adjectives and corresponding noun to form grammatically sound whole - big red apple. In case of English reorder the adjectives?