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

bug(android): Casing questions on the suggestion banner #8164

Closed
darcywong00 opened this issue Feb 3, 2023 · 9 comments
Closed

bug(android): Casing questions on the suggestion banner #8164

darcywong00 opened this issue Feb 3, 2023 · 9 comments

Comments

@darcywong00
Copy link
Contributor

darcywong00 commented Feb 3, 2023

Running 16.0.138 stable in the Keyman for Android app, I encountered some scenarios that look curious:
(Not sure if any is related to #7165

Scenario 1 - "Hello" suggestion is capitalized

Typing "hell" results in the suggestions: hell, Hello, hella. I'm confused why "hello" is always capitalized. This isn't at a start of a sentence.

Hello-middle

Scenario 2 - "Hello" moves from middle to left position

From scenario 1, leave the device inactive until the screen lock kicks in. After unlocking the screen, the suggestions refresh to: Hello, hella, helluva

Hello-left

I haven't tested on other platforms to see if this is only on Android
I built stable-16.0 and tried mobile viewport of web/testing/prediction-mtnt and it shows "Hello" in the middle too

kmw test page - hello

@darcywong00 darcywong00 changed the title bug(android): Casing questions on the suggestion banner bug(android,web): Casing questions on the suggestion banner Feb 3, 2023
@darcywong00
Copy link
Contributor Author

OK examining the mtnt.tsv word list, it uses "Hello". (Also "Yep")

https://github.com/keymanapp/lexical-models/blob/master/release/nrc/nrc.en.mtnt/source/mtnt.tsv#L2609

https://github.com/keymanapp/lexical-models/blob/master/release/nrc/nrc.en.mtnt/source/mtnt.tsv#L1618

I thought predictive text lower-cases all the words though?

@mcdurdin
Copy link
Member

mcdurdin commented Feb 3, 2023

I thought predictive text lower-cases all the words though?

Upper case suggestions remain upper case (for proper nouns in many langs). Otherwise case matches context.

@darcywong00
Copy link
Contributor Author

Upper case suggestions remain upper case (for proper nouns in many langs). Otherwise case matches context.

OK, I've updated keymanapp/lexical-models#178 to cleanup the capitalizations there.

Then this issue will remain for tracking down why the Android app resumes and moves suggestions over. (Scenario 2)

@darcywong00 darcywong00 removed the web/ label Feb 3, 2023
@darcywong00 darcywong00 changed the title bug(android,web): Casing questions on the suggestion banner bug(android): Casing questions on the suggestion banner Feb 3, 2023
@darcywong00
Copy link
Contributor Author

darcywong00 commented Feb 6, 2023

I can repro scenario 2 on Keyman for iPhone and iPad 16.0.138.

Is predictive text doing something different when resuming?

Is this an issue with the Android and iOS apps, or KeymanWeb?

@darcywong00
Copy link
Contributor Author

To triage again in A17S7

@darcywong00 darcywong00 added this to the A17S7 milestone Feb 7, 2023
@darcywong00 darcywong00 modified the milestones: A17S7, A17S8 Mar 3, 2023
@darcywong00
Copy link
Contributor Author

Then this issue will remain for tracking down why the Android app resumes and moves suggestions over. (Scenario 2)

I added logging and on resuming the Android app, I see languageProcessor.invalidateContext() is getting called.

@darcywong00 darcywong00 modified the milestones: A17S8, A17S9 Mar 6, 2023
@darcywong00
Copy link
Contributor Author

Bumping back to 17.0 for @jahorton to look at when modularization refactor is completed.

@darcywong00 darcywong00 modified the milestones: A17S9, 17.0 Mar 20, 2023
@jahorton
Copy link
Contributor

jahorton commented Mar 20, 2023

Is predictive text doing something different when resuming?

Sorry, didn't notice this issue until now. The very likely answer is yes, it is doing something different. You should get very similar results if you change the caret's location and then place it back at the end of the context.

The big distinction I'm noticing here: hell - the actual typed text - is being removed as an option when resuming. It's what's already there, and there's no need to modify anything. On resuming, it's not like you just typed it; simply "doing nothing" is sufficient to leave it in place.

When actively typing, we present a 'keep' option if it does indeed match a word in the lexicon when including the keystroke just typed. ("Hell" is a valid English word.) On context-changes, though... it seems like the "keep" option isn't being generated or returned, for whatever reason. (Note: "resuming" is acting like a context-change.) Thus, that option disappears and the other options slide over.

@darcywong00
Copy link
Contributor Author

Sounds like the suggestions are presented as designed.

Resuming = context-change = not typing anything for the "keep" option.
Can close

@darcywong00 darcywong00 modified the milestones: 17.0, A17S9 Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants