sailfish-keyboard / presage

Fork of Presage (http://presage.sourceforge.net/)
GNU General Public License v2.0
6 stars 10 forks source link

Capitalization / non-LOWERCASE_MODE support #35

Open tpikonen opened 6 months ago

tpikonen commented 6 months ago

I implemented capitalization support similar to the sailfish on-screen keyboard to the presage completer in phosh-osk-stub (here), but we were wondering if this would be possible in presage itself?

The words in the databases seem to be always in lower case, but does presage support mixed case databases? At least there is the LOWERCASE_MODE key in config, but setting it to no did not produce anything usable out of the box.

There is this bug reported by @martonmiklos in the original sourceforge bug tracker, but it did not get any response: https://sourceforge.net/p/presage/bugs/13/

Also possibly related: #16.

rinigus commented 6 months ago

Not much I can add to #16. Unicode transition has stalled for years.

As for whether presage would support mixed case database - I don't know. I expect so. You would have to look into the normalization of the strings before stats done on them. Maybe LOWERCASE_MODE doesn't change it, haven't looked into it. I presume that enabling this mode would require also making new databases.

However, you may want to handle mixed case not just by disabling normalization. It would probably make more sense in distinguishing abbreviations and start of the phrase (or any other rule in language requiring capitalization) together with normalization of the string. But, to my knowledge, nobody from us has looked into it.