Re: XIM String Conversion Callback
- From: Theppitak Karoonboonayanan <thep links nectec or th>
- To: gtk-i18n-list gnome org
- Subject: Re: XIM String Conversion Callback
- Date: Sat, 6 Jan 2001 17:58:23 +0700
On Fri, Jan 05, 2001 at 12:35:07AM +0800, Steve Underwood wrote:
> Owen Taylor wrote:
>
> > "recoversion" means taking areas of text that have already been
> > converted into the final form and sent to the client and changing them
> > back to a preedit string.
> >
> > Usually the way this would work is that the users selects a
> > part of the text that was misconverted and hits a hot key
> > or selects a command from a menu. Alternatively, while editing,
> > there may be a hot keys to reconvert the previous word, etc.
> >
> > I've never actually used a system with reconversion, but it
> > apparently can be useful.
The "reconversion" capability, if done, will be more than useful for Thai
text input. It should be a minimal requirement for systems that support Thai.
> Is this supported in XIM? I never actually got around to fully
> implementing the pre-edit stuff, when I cleaned up and debugged IMdkit,
> but I thought the process was that once you committed the pre-edit string
> it stayed that way. I can understand how the reconversion you describe
> might well be useful when editting existing text.
Yes, editting existing text is the source of the requirement.
Consider the case of Thai. We have 4 levels of rendering:
base (C), below (B), above (A), and top (T) :-
(T2) (T5)(T6) ..[top]
(A2) ..[above]
(C1)(C2)(C3)(C4)(C5)(C6)(C7) ..[base]
(B5) ..[below]
We stringify this text from left to right with (C(A|B)?T?)* pattern,
like this :-
(C1)(C2)(A2)(T2)(C3)(C4)(C5)(B5)(T5)(C6)(T6)(C7)
Note that we need to block the sequences of "..(C2)(T2)(A2).." and
"..(C5)(T5)(B5).." because they do not match the cannonical pattern.
So, with the existing text "(C1)(C2)(T2)", the usual insertion of (A2)
here is illegal. There are two ways of coping with it:
1) Simply reject (A2) by having the input method convert absorb the
key event
2) Edit the context previously committed so that (A2) is inserted
before (T2)
It's obvious that the solution 2) is more convenient for users and needs
the "reconversion" capability.
However, we found that even with the solution 1), it still requires the
capability to "retrieve" the context to determine the validity of the
current key, because the cursor movements can change the context of
interest.
Or if we use pre-edit string to commit each column of text, the
input method still needs to "retrieve" the previously committed
column to edit, before "reconverting" it back to the IC.
To my understanding, the Xlib does allow the "reconversion" mechanism,
but the problem is the lack of supports in applications/toolkits.
I found GTK+ has concerned Thai language enough to support it in Pango
rendering engine. So, the input method is just another half to complete
it. :)
> In experimenting with intelligent Chinese entry, I never really
> found a way to make this kind of thing work well. Context derived directly
> from the typists actions seems the only sort that really works well.
> Deriving context from globs of text in languages without formal
> punctuation is tough! Then again, maybe my methods were just not
> intelligent enough.
The input method should know well what it needs. And I think the problem
is how to fullfill all the "reconversion" methods allowed by X.
I have so little knowledge about Chinese or other languages.
But for Thai, the only problem is the retrieval by word. And I think
Pango has already defined an interface for this. Could it be used here?
Regards,
-Theppitak.
--
Theppitak Karoonboonyanan
Information Research and Development Division, NECTEC
(Was: Software and Language Engineering Laboratory)
http://www.links.nectec.or.th/~thep/ mailto:theppitak nectec or th
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]