languagetool-org / languagetool

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

[pt] Idea for rule: “serve para” → “permite/possibilita” - 2023-03-15 #8047

Open marcoagpinto opened 1 year ago

marcoagpinto commented 1 year ago

Hello @ricardojosehlima

Sorry for not opening rules tickets in GitHub but for two days that I have been feeling ill, I feel stoned, I hope it is not COVID-19 since I have all the vaccines.

Take a look at: Este botão serve para gravar ficheiros JPEG. TO Este botão permite gravar ficheiros JPEG.

Is it a good idea?

Thanks!

ricardojosehlima commented 1 year ago

Hi! Best wishes for your health! As for the rule, some cases to look at: Ele não serve para esse serviço --> Ele não permite esse serviço (????) Meu amigo serve como ajudante na empresa --> Meu amigo permite como ajudante (????)

The great problem of the rule is that it can't apply to animate nouns...

marcoagpinto commented 1 year ago

Ahhhh... it won't be implemented then, thank you!

marcoagpinto commented 1 year ago

ahhhh... and with a verb in front?

I was just wondering.

marcoagpinto commented 1 year ago

@ricardojosehlima

Should I try with a verb in front to see what happens?

Thanks!

ricardojosehlima commented 1 year ago

Hi, didn't understand your question

marcoagpinto commented 1 year ago

Heya!

I am solid as a rock!

I was only stoned for two or three days, or so.

What I meant was: Este botão serve para gravar ficheiros JPEG.

Your examples didn't work with the rule, but, will it work if we have a verb in front of the “para”?

This is what I was asking.

😛

Thanks!

ricardojosehlima commented 1 year ago

Hi not so sure, these verbs carry relevant meanings

marcoagpinto commented 1 year ago

Ahhhh… I will do a test at 5am to see what happens.

If it doesn't work, it isn't much of a rule anyway.

Thanks!

😄 😄 😄 😄

marcoagpinto commented 1 year ago

@ricardojosehlima

Hello!

It is working and, to me, it sounds fine, but nothing like a second opinion. 😋

https://github.com/languagetool-org/languagetool/commit/743704379863922717a7a5a59cffd448a52db269

Portuguese (Portugal): 31 total matches
Portuguese (Portugal): 582235 total sentences considered
Portuguese (Portugal): ø0.00 rule matches per sentence

4.txt

ricardojosehlima commented 1 year ago

Looks good for me too!

marcoagpinto commented 1 year ago

Cool!

❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️

I will start working on the “-chave” rule in a few hours.

😛 😛 😛 😛 😛 😛 😛 😛 😛 😛 😛 😛 😛 😛 😛

susanaboatto commented 1 year ago

Still doesn't quite work when it comes to specifying function:

o governo serve para governar. Esta colher serve para tomar sopa.

marcoagpinto commented 1 year ago

Yes, Susana, there is no good way of solving it, but it isn't perfect. 😋

marcoagpinto commented 1 year ago

@susanaboatto

Maybe add an exception line for action verbs?

"governar, tomar, etc." and as verbs are found they are added there?

marcoagpinto commented 1 year ago

@susanaboatto

Or maybe add an entity with action verbs?

That way, they could be used across rules that require them.