keyman icon indicating copy to clipboard operation
keyman copied to clipboard

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

Open MakaraSok opened this issue 3 years ago • 9 comments

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:

  • Device: Pixel 2 (AS emulator)
  • OS: Android 10
  • Keyman version 14.0.271
  • Target application: Keyman

Keyboard

  • Keyboard name: khmer_angkor
  • Keyboard version: 1.0.9
  • Language name: Khmer
  • LM source: https://github.com/keymanapp/lexical-models/pull/131

MakaraSok avatar Apr 22 '21 06:04 MakaraSok

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

MakaraSok avatar Apr 22 '21 09:04 MakaraSok

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.

jahorton avatar May 17 '21 01:05 jahorton

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?

mcdurdin avatar Mar 31 '22 04:03 mcdurdin

@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.

jahorton avatar Apr 14 '22 21:04 jahorton

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

  • when there is 'more' text in a field, suggestions are failing to appear.
  • deleting text (backspacing) often leaves the banner empty.
  • Here's anomolous behaviour I observed with a recent 15.0 beta, using sil_euro_latin, in-app on Android:
    • Type hell, select "Hello" from banner (note capital 'H'?!)
    • Type wor, select "world" from banner.
    • 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.

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

mcdurdin avatar Apr 16 '22 20:04 mcdurdin

  • 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 avatar Apr 18 '22 16:04 jahorton

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?

jahorton avatar Apr 28 '22 15:04 jahorton

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.

mcdurdin avatar May 12 '22 21:05 mcdurdin

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

jahorton avatar May 16 '22 06:05 jahorton

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

mcdurdin avatar Oct 16 '22 23:10 mcdurdin

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.

MakaraSok avatar Oct 20 '22 09:10 MakaraSok

Good stuff, closing as resolved :grin:

mcdurdin avatar Oct 20 '22 22:10 mcdurdin