Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different logic for punctuation in Ukrainian and English #634

Closed
WallK opened this issue Sep 22, 2024 · 9 comments · Fixed by #637
Closed

Different logic for punctuation in Ukrainian and English #634

WallK opened this issue Sep 22, 2024 · 9 comments · Fixed by #637
Labels
bug Something isn't working stale

Comments

@WallK
Copy link
Contributor

WallK commented Sep 22, 2024

Hello!
I have a habit of entering the question mark by pressing 1 and left after a word
It still works for English, but the punctuation input layout changed for Ukrainian and it throws me off a bit (:
It uses the new "+" type of adding letters to words (see below)
English after pressing 1:
en
Ukrainian after pressing 1:
ua

Is this intentional?
Cheers!

@sspanak
Copy link
Owner

sspanak commented Sep 22, 2024

This complication is because of the words with apostrophes. And it seems that I didn't test well enough. You can see the intended behavior, if you type "don't" in English. When you press "1" for an apostrophe, typing another letter ends the previous word and starts a new one. The only possible way to continue typing the same word is to complete "don't" by pressing 8.

To fix the problem, I will:

  1. Make the base word unselectable, to make it possible to select the question mark in one click.
  2. End the current word after pressing 1, unless you have selected the apostrophe, in which case it will be possible to append more letters and type some new word. This will be possible only in Ukrainian and Hebrew because of the unique way the apostrophe is used. In all other languages, it will end the word too.
  3. Test better 😀
  4. Leave the "+" way of representing the combinations. In my opinion, it is more clear than:
привіт, | привіт. | привіт' ... | привіт! | привіт?

How does this sound?

@sspanak sspanak added the bug Something isn't working label Sep 22, 2024
@WallK
Copy link
Contributor Author

WallK commented Sep 22, 2024

I don't see a very big difference between apostrophe use in Ukrainian and English
The only difference is the after apostrophe letters in English is a short list, and in Ukrainian they are arbitrary
Maybe that's a huge difference for prediction engine (:

I like the plus much more, the repeated word suggestion were a nightmare (:
But at least they let me click left once, like in other languages!

How will the point 2 work with Ukrainian and Hebrew? Will I be able to type "Мар'яна" with 4261952 or will I need to manually select the apostrophe? Because I'm much more happier to press some more left to get question mark than scrolling through to apostrophe

@sspanak
Copy link
Owner

sspanak commented Sep 23, 2024

It just works, have a try (v38.26).

You can type "Мар'яна" with 4261952
You can type "Нас?" with 4261 + left to select "?"
You can type "Нас," with 4261 + OK. 4261 + left + right (enforce selection of ","), then just continue with the next word.

It should be able to guess all situations automagically now. Please, let me know if there is still something wrong.

Also, have in mind the version I have attached, also contains half of the changes for the upcoming version 39.0. Toggling between uppercase and lowercase can be done using a separate SHIFT key only (hopefully, for the better). See this comment and this issue for more info.

@sspanak sspanak linked a pull request Sep 23, 2024 that will close this issue
@sspanak
Copy link
Owner

sspanak commented Sep 26, 2024

@WallK, have you managed to try the new version? Does it solve the punctuation problems?

@WallK
Copy link
Contributor Author

WallK commented Sep 26, 2024

I've played with it and it works nicely for non-apostrophe words
But 4261+left produces "Мар'янівку" (last word in suggestion list, it wraps around to it, not to ?)

@sspanak
Copy link
Owner

sspanak commented Sep 26, 2024

Ah, yes, I wanted to ask you about this case.

By default, it always tries to produce 20 suggestions. But the punctuation combinations are less than that, so it adds longer words. I was thinking that, since this is a somewhat special case, when the current digit sequence ends with 1, maybe there should be no longer words?

For example, if you type "426", then you would get: "пас", "мас", "нас" and whatnot. Say, "нас" is the first one. Then, if you press "1", you will get only the exact "4261" combinations: "нас" + ,.'" ... !? and nothing else. And only after pressing "9" for "я", and if no word filter is applied (by manually selecting a letter before that, or by pressing Filter), you will get "Мар'яна" or similar words.

And this logic will be applied to all languages. I think it is the better choice, even though it will not be possible to type "don't" using "3661" + left, but only using "36614". Actually, now that I explained it to you, I realized "don't" will again require 5 clicks, so typing will not be slower.

@WallK
Copy link
Contributor Author

WallK commented Sep 26, 2024

I think I've never looked for the suggestion before I've pressed all the required buttons, but I could be an exception
Meaning stopping word suggestions after one is perfect for me! The only thing that will bother me here -- inconsistency between this + and ended words with punctuation (but what can you do with a unique language like that, huh?)

"Don't" by 36618 is the only way I knew, the suggestions of words after 1 was a think that irritated me, so I've never tried to use it

I think this is a good default, but maybe a config option is a better idea?
Something along the lines "Suggest longer words after punctuation?" toggle (but with a better wording) (:

@sspanak
Copy link
Owner

sspanak commented Sep 26, 2024

Here is v38.29 with the latest apostrophe upgrade. Please, test again and let me know if there are any other issues. Obviously, I can't think of all the scenarios when I don't use Ukrainian at all.

I think this is a good default, but maybe a config option is a better idea?
Something along the lines "Suggest longer words after punctuation?" toggle (but with a better wording) (:

No configuration until someone complains. I don't want to touch that code anymore. 😄

@WallK
Copy link
Contributor Author

WallK commented Sep 29, 2024

Hey, it works! There are some weird stuff I always forget how to reproduce so I postponed writing a comment
I'll create a new issue instead
Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants