Open tiff opened 4 years ago
It gets even worse:
I think as a first small improvement we could do the following:
If the word is unknown (like "Michaels"), ends with an "s" and the next word is a noun or an adjective, then we should check if the word without "s" is known as a noun and suggest it with 's
Another one, where no error is found
My friends new car is awesome.
This one should be detectable through POS (combination of NNS and "is/has/was/ ...")
Related rule: POSSESSIVE_APOSTROPHE
A possible alternative suggestion is Michaels' .
"Michaels" is an English surname (https://en.wikipedia.org/wiki/Michaels_(surname) )
If the word is unknown (like "Michaels"), ends with an "s"
If we add postag NNP to Michaels, your suggestion won't work. Thus, I am not sure whether to add the postag.
There will be quite some no-so-good suggestions with names, see Wikipedia run attached. But as it's just about the suggestion and current state is bad, I'll commit my change. Will not work for "Googles", BTW, as that is accepted. "Michaels" and "Microsoft" should work.
Looks to me as if there's just the NN(P)S tag and spelling is missing for the terms in your .txt
. Should be easy to fix.
@danielnaber the functionality you built here probably got lost (due to the resorting?).
compare first (languagetool.org) vs second (languagetoolplus.com)
I have committed a quick fix, but Simon's
is at position 2, not 1. It seems the suggestions with type SuggestionType.Curated
(Simon
and Simon's
in this case) are kept at the top of the list, but still-resorted among each other. @fabrichter We can change the algorithm so that if both words in the comparator are Curated
, we keep the original order, can't we?
Plus, we obviously need more service-level tests...
I think this is a very common error, and we don't suggest "Michael's".