Helium314 / HeliBoard

Customizable and privacy-conscious open-source keyboard
Apache License 2.0
1.97k stars 71 forks source link

Spell checker problem #55

Open RHJihan opened 11 months ago

RHJihan commented 11 months ago

The bug Spell checker flags as incorrect when terminating a sentence with a sentence terminator other than a period. Such as flagging a correct word after inserting the Bengali period (U+0964) or U+0965. Android: 13

@BlackyHawky found (Android 10): All the numbers are underlined in red, as well as some capitalized words.

In English:

In French:

referral: https://github.com/Helium314/openboard/commit/a1cf043083159daafb0cc3b6157bfb90b6ce9ae5#commitcomment-123452992

BlackyHawky commented 10 months ago

I don't know if it's the same for you, but since this commit a1cf043, I often have emojis underlined in red too.

Helium314 commented 10 months ago

I'll leave this to someone else, as I can't reproduce this on Android 9.

Possibly a first step would checking which words (TextInfos) are received in from system in AndroidSpellCheckerSession.onGetSuggestionsMultiple, AndroidSpellCheckerSession.onGetSentenceSuggestionsMultiple, or AndroidWordLevelSpellCheckerSession.onGetSuggestions.

Maybe also https://github.com/Helium314/openboard/commit/a1cf043083159daafb0cc3b6157bfb90b6ce9ae5 should be reverted depending on what the actual issue is.

Helium314 commented 10 months ago

One thing I noticed that could be relevant here is that there is only one sentence separator (sentence_separator), while ? and ! are only in suggested_punctuations (does not contain .), symbols_word_separators and symbols_followed_by_space.