languagetool-org / languagetool

Style and Grammar Checker for 25+ Languages
https://languagetool.org
GNU Lesser General Public License v2.1
12.49k stars 1.4k forks source link

[pt] disambiguation.xml fix #10861

Closed marcoagpinto closed 3 months ago

marcoagpinto commented 3 months ago

Heya, @susanaboatto , @p-goulart and @jaumeortola ,

I have fixed rare verbs detecting:

Quero duas garotas.
Quero duas partes.

"garotas" and "partes" no longer appear as verbs.

But it will impact in the whole core of PT.

That is why I am always scared to change the disambiguator.

But if you believe it is okay, then it is a major improvement, and it will fix tons of false positives in our rules.

marcoagpinto commented 3 months ago

Ahhhh... it now also fixes:

Quero as duas militares.
Quero os dois militares.

"militares" no longer appears as a verb.

marcoagpinto commented 3 months ago

Sorry!!!!!!!

I have just fixed it: Para as duas matares.

If the words are not also nouns, it won't remove them as verbs.

marcoagpinto commented 3 months ago

Now it is working again with:

Quero duas garotas.
Quero duas partes.
Quero as duas militares.
Quero os dois militares.
Para as duas matares.
marcoagpinto commented 3 months ago

@p-goulart

Pedro, I am so stressed!

πŸ˜› πŸ˜› πŸ˜› πŸ˜› πŸ˜› πŸ˜› πŸ˜›

Thanks!

p-goulart commented 3 months ago

The rule seems tightly scoped, I doubt this will have many undesired side effects. But do keep an eye on the diff tomorrow morning.

@susanaboatto probably wiser not to include this in a premium deployment, if it does happen later today (I know there may be some changes to the schedule, but just in case.)

marcoagpinto commented 3 months ago

Yes, at 5am I will look at the diff to check if some exceptions need to be added.

marcoagpinto commented 3 months ago

@p-goulart @susanaboatto

It worked better than expected: https://internal1.languagetool.org/regression-tests/via-http/2024-09-03/pt-BR/ https://internal1.languagetool.org/regression-tests/via-http/2024-09-03/pt-PT/

With such a positive experience, it seems I will β€œplay” more with the disambiguation from now on πŸ˜› πŸ˜› πŸ˜› πŸ˜› πŸ˜› πŸ˜› πŸ˜›

I AM SO HAPPY!!!!!