From: McKaot <mc...@go...> - 2010-09-07 08:43:34
|
Dear ICU team and users, In order to provide an interactive IME support (based on a concrete transliteration), I would like to propose the following ICU4J API for the next ICU release: public final class IMEUtility { /** * Make a suggestion for a given input context which keys are possible to complete the input * @param transliterator - a concrete transliterator, that is used to transform the user input * @param text - the input context * @param index - the start and limit of the text, the position of the cursor, and the start and limit of transliteration * * @return a character set containing possible characters for the specified input context. It can be an empty. * * @draft ICU 4.6 */ public static UnicodeSet suggest(Transliterator transliterator, Replaceable text, Transliterator.Position index). } With such an API it would be possible to implement an interactive IME - independent from a concrete user interface framework (AWT/Swing, SWT, whatsoever). This would simplify the input of characters that cannot be typed in streight forward manner, e.g. characters combined with diacritical signs. This way a non-latin input is also facilitated; for example, for the pinyin syllable 'hong' there are quite some chinese glyphs. The benefit ot such a method would be to show them BEFORE the user has completed the input - something like this here: http://www.chinese-tools.com/tools/ime.html An adaptation for any ui framework can, of course not be up to ICU. Best regards Andrew PS: I can imagine, that this is an interesting feature ICU4C, too. |