Back to LanguageTool Homepage - Privacy - Imprint

[pt] Possible new rule "hoje/amanhã a tarde/noite"


(Marco A.G.Pinto) #1

@tiagosantos

Hello Tiago,

I was on Facebook and a guy wrote:
"hoje a tarde"

So, I thought about a rule to suggest replace "a" with "à" but I am not sure how to handle the invalid forms.
For example, it would work with:
"Vamo-nos encontrar hoje/manhã a tarde/noite"
But, it would fail with:
"hoje a tarde vai estar bonita"

Tiago, since you already master LanguageTool, could you think about a way of implementing it?

Thanks!

Kind regards,


(Marco A.G.Pinto) #2

it must also work with weekdays :slight_smile:


(Tiago F. Santos) #3

Hi Marco,

'Crase' (a +a = à) rules are tricky and they require many specific rules.
I am now focusing on learning Java well, and I am prioritaritizing fixes and improvements, but I will have a look at this.

One thing that would help, is if you get a list of all the time expressions it would fit, so we make a re-usable entity for it.


(Marco A.G.Pinto) #4

For what I can think:
[1] a [2] = [1] à [2]

[1]
hoje
amanhã
segunda
segunda-feira
terça
terça-feira
quarta
quarta-feira
quinta
quinta-feira
sexta
sexta-feira
sábado
domingo

[2]
tarde
noite

This is what comes to mind, not sure if some things are missing.

The problem are the exceptions which I am not sure about all, but it would make a great rule since now and then people make this mistake while writing and, more serious, while speaking (as we have seen on TV several times).


[pt] Portuguese rule contribution/discussion
(Marco A.G.Pinto) #5

also?:
tardinha
noitinha
?