keymanapp / keyman

Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
https://keyman.com/
Other
403 stars 112 forks source link

bug(common/models): LM stops working on a fresh install #4959

Closed MakaraSok closed 2 years ago

MakaraSok commented 3 years ago

Describe the bug

With a fresh installed of Keyman for Android, after installing Khmer Angkor keyboard and NC Khmer Wordlist LM, start typing in the text area ស្រ to see no suggestion on the banner.

Expected behavior

The LM should give the expected/relevant suggestions on the banner.

Screenshots

InkedScreenshot_1619072210_LI


Keyman for Android:


Keyboard

MakaraSok commented 3 years ago

The behavior is rather unpredictable. I experienced that the error would not happen right of the gate. The suggestions might keep showing after typing ស្រ . The LM would crash or stop giving the suggestions if the same sequence is typed over and again after choosing from the suggestions.

i.e. keep typing ស្រ and choose ស្រី (the first option) until the banner turns blank. See below. It turns blank after three rounds for me.

Screenshot_1619083180

jahorton commented 3 years ago

It's worth noting that errors will generally be a lot more likely for models targeting languages without proper word-breaking implementations. Our support for them is simply lacking until we're able to implement #5025.

If this can be shown to also affect models for languages with space-based wordbreaking, that would give this issue higher priority.

mcdurdin commented 2 years ago

I am wondering if this is a performance issue -- that the prediction engine is giving up because the lookup is slow and we are near a timeout threshold and sometimes crossing it?

jahorton commented 2 years ago

@mcdurdin You mentioned at one point that there were some other behaviors not currently documented here that might be related? Could you please add those details here? I'll need those in order to better pursue this issue.

mcdurdin commented 2 years ago

There is nothing specific. I have observed, which may or may not be releated:

Hope these pointers help a bit. That last one in particular may be relevant?

jahorton commented 2 years ago
  • Backspace quickly until "Hello w" is left -- the banner will often (but not always) offer "the", "to", "a" instead of words starting with "w". Note that backspacing slowly will usually offer more appropriate suggestions.

Is that with a multi-tap backspace, rather than a held one?

Also, can you replicate this in iOS? Or on the "Predictive Text: robust testing" Web test page? I'm not seeing this effect on either platform in my personal tests.

deleting text (backspacing) often leaves the banner empty.

I don't see this either, and that's when backspacing as rapidly as possible, even with long words.

jahorton commented 2 years ago

The closest thing I've seen was when keystroke errors were occurring behind the scene during some unrelated development/testing recently. When that happens, if memory serves, the Android keyboard tends to reset itself - so I doubt that's at fault here. Or has this changed signfiicantly - and if so, in what ways?

mcdurdin commented 2 years ago

Is that with a multi-tap backspace, rather than a held one?

Multi-tap

Also, can you replicate this in iOS? Or on the "Predictive Text: robust testing" Web test page?

I haven't had the capacity to try and replicate on other platforms yet, sorry.

jahorton commented 2 years ago

While we're not sure exactly how just yet, it seems that this may have interesting interactions with Android-specific behaviors.

mcdurdin commented 2 years ago

@MakaraSok would you mind re-testing this one please?

MakaraSok commented 2 years ago

Tested with Keyman for Android 16.0.84-alpha on SG S9+ running Android 10. The issue cannot be reproduced. It seems to have gone away by now.

mcdurdin commented 2 years ago

Good stuff, closing as resolved :grin: