Conversation
User Test ResultsTest specification and instructions
Results TemplateTest Artifacts |
mcdurdin
left a comment
There was a problem hiding this comment.
I appreciate the work you have done to find a solution to this.
But I am now uncertain if this the best way forward. Workarounds have a tendency to linger and cause long-term pain when trying to move forward. There is a delicate balance between maintaining interface back-compat and fixing bugs in interface clients.
Is the documentation correct? I think it may be a little ambiguous on whether non-word tokens should be included in spans?
But it does seem like the two models which are experiencing issues are implementing the custom wordbreaker incorrectly, according to the documentation. So, if that is that case we should fix them rather than working around them.
The documentation states:
The function must return zero or more Span objects. The spans, representing an indivisible span of text, must be in ascending order of their start point, and they must be non-overlapping.
We could add a sentence to state that the spans must cover 100% of the text -- that is, there must be no gaps or overlaps. If that is what we need?
Hard call.
| * This file defines a wordbreaker wrapper that corrects custom wordbreaker | ||
| * whitespace handling and span indexing issues. |
There was a problem hiding this comment.
It'd be good to be clear on what "wordbreaker whitespace handling and span indexing issues" actually are -- this is a bit vague.
|
|
||
| break; | ||
| } else { | ||
| // ait.mnw.mon's custom breaker does not specify the length property! |
There was a problem hiding this comment.
As far as I can tell, length is required in the documentation. So, in this case we should fix the model rather than adding a workaround.
There is a delicate balance between maintaining interface back-compat and fixing bugs in interface clients.
There was a problem hiding this comment.
I believe that fortunately, .length itself isn't critical. I could probably remove that specific section and things would proceed perfectly fine.
I suppose our guide documentation is ambiguous. As it was, I had to double-check things against our model-types TS definitions as declared here: keyman/common/lexical-model-types/index.d.ts Lines 286 to 323 in 4211b46 (This is linked to directly by the page you linked in the comment above.) Note that the examples do not produce spans for would-be whitespace tokens. Our Unicode-default wordbreaker also does not do this.
For Its naive handling of whitespace is also problematic.
Then our existing provided wordbreakers also don't meet that spec. Again, even our default Unicode wordbreaker currently does not report the whitespace tokens; we re-derive such spans in post. That said, I'd rather it did provide the whitespace tokens.
|
Fixes: #16587
Fixes: #16585
Build-bot: skip release:web,android,ios
🚧 Current known issues 🚧
mon_anonta, the second default suggestion, when applied, will often leave the banner unaffected. Re-tapping the suggestion will yield a blank banner and duplicate the suggestion - both of which are undesired behaviors.User Testing
TEST_KHMER_REPRO: Using Keyman for Android, the
khmer_angkorkeyboard, and thesil.km.gccmodel, verify that #16587's repro no longer triggers the error.TEST_KHMER_PREDICTIONS: Using Keyman for Android, the
khmer_angkorkeyboard, and thesil.km.gccmodel, verify that text predictions operate smoothly.TEST_ANONTA: Using Keyman for Android and the
mon_anontakeyboard, verify that predictions operate smoothly.