sspanak / tt9

A T9 keyboard for Android devices with a hardware keypad.
Apache License 2.0
245 stars 43 forks source link

Support for compound words in predictive mode #418

Closed mathlu closed 8 months ago

mathlu commented 9 months ago

In swedish, and possibly other languages compound words exist where words consist of two or more words joined together. For example the word for fever thermometer in swedish is "febertermometer" consisting of the word "feber" for fever and "termometer" for thermometer.

Since it would not be feasible to add all possible combinations of words that make up these compound words to the dictionary it would be good to be able to mark that input has finished for one part of the word and that a new word is starting without a space being added in predictive mode.

Suggested flow:

References: http://nds2.webapps.microsoft.com/files/support/apac/phones/guides/Nokia_5210_APAC_UG_en.pdf page 20.

sspanak commented 9 months ago

Well, you can type compound words even now. Just type the first word, hit backspace to erase the extra space and type the second word.

Or, if you don't want automatic spaces added, just turn them off from Settings -> Keypad -> Predictive Mode section -> Automatic Space. This way, OK will not add an extra space and you would be able to choose whether to add one with 0-key or not.

Now, if you still want automatic spaces only after punctuation, it is possible to split the setting and have something like "Automatic space after words" and "Automatic space after punctuation". This way, you would have even finer control. And... I think it's the best I can do. You can't have auto correction on and off at the same time... :slightly_smiling_face:

Finally, TT9 recreates the Nokia experience on modern Android devices, but it is never going to be exactly the same as Nokia 5210 or 3310 or any other. You can't expect that. It will always be somewhat different from your past favorite phone.

I hope the above helps you solve the problem.

sspanak commented 8 months ago

Reading all this one more time, I realized there is a bug with the "Clear Filter" function. By default, DPAD Down is assigned to it and it must work exactly as you described - when no filter is active, it must break typing and predictions, allowing you to continue with a new word. I'll fix that in the next version.

There is no indication you are combining two words, but I believe it is not necessary. In reality, typing a compound word is just typing simple words next to each other.

So disregard my previous comment, I just misinterpreted what you said.