languagetool
languagetool copied to clipboard
[pt] Main suggestion not appearing
Hi,
I'm using the premium version on Google Docs and for "ja", the main suggestion that should be "já" does not appear, as seen in the attached file.
Can't repro this anywhere, on either premium or OS, on any client. Local tests with the latest released version likewise show já
as the first suggestion 🤔
Is this behaviour limited to Google Docs? (That would be even weirder, but you never know...)
Yeah, that's weird because for sure, before the suggestion was 'já', it hasn't been like this. It happened on Canva too. I'm using Google Chrome in Windows 11.
@ricardojosehlima can you confirm this is still occurring? We have since then released new dictionary binaries.
@p-goulart Hi, not only it persists, now it has been joined by a new "friend", look at the attached image.
What I have observed is that in those suggestions for "não" there are words that I have inserted in the dictionary (Naro, Nham), same for "ja" (JP, Jh, 2A)
Aha. That was the piece of the puzzle I was missing. Now I can repro. Added JAX
to my personal PT dictionary and akreayd
to my personal EN dictionary... and lo and behold:
This is, for now, 'expected behaviour', in that words from the user's personal dictionary are ordered first in the speller's suggestions... But I 100% see the usability issue.
@jaumeortola, thought you might be interested. Do you know of a quickfix before I start investigating?
We are giving top priority to all suggestions from user dicts. See, for example: https://github.com/languagetool-org/languagetool/blob/07d276b76035fba10f731b8b3625a65508c0c597/languagetool-core/src/main/java/org/languagetool/rules/spelling/morfologik/MorfologikSpellerRule.java#L595
Maybe for short words (up to 4 or 5 characters), we should change that priority. That would mean probably ignoring the user words.
A quicker fix is to add these frequent errors to a simple replace rule: ja=já nao=não sao=são
I think the replacement rule is a good idea, specially for nao and sao. For ja, maybe it was another word intended different from "já", but it may be rare. As for prioritizing the user dicts, after some time no suggestion from LT will appear, if the user inserted some 4 or 5 words that look like the error. But as @jaumeortola pointed, maybe for small words it shouldn't be so and the priority could hold for longer words.
@ricardojosehlima a solution was committed by @jaumeortola at add8cee980e that specifically targets short words. If it causes no problems, it will be released to the premium version some time next week.