[pt] Portuguese rule contribution/discussion

Thanks, Tiago!

I will test it when the nightly is released.

@tiagosantos

Sorry for only testing now.
"

  1. Informação pessoal
    1.1. Nome
    1.2. Morada
    1.3. Telemóvel
    1.4. E-mail
    "

It now flags 1.1.

All the rest works fine.

@tiagosantos

Tiago,

“Meu irmão, descansa em pás!”

Still triggers informal language :frowning:

This is not a problem because wrongWordinContext takes priority. Every word can change the interpretation of the sentence completely (specially in disambiguation mechanisms), so we can’t safeguard against it.
Anyway, anyone can change line 20477 to
<exception postag_regexp='yes' postag='(N.|[ADP]..|V.....)[FC].*|SPS.+'/></token>
in their copy if they find this is a common error in their wirtting.

@tiagosantos

Hello!

You are going to murder me… but I found another issue… there is a dash issue in dates, please see the attached image (I tried to attach an .ODT but it is not supported… which is strange because it worked before?)

It complains about the dash in the first date: “20170326” but not in the one at the end of the page.

.

PS-> Tiago, I tried to paste the text here and then copy/paste into LO and it no longer gave the error, so I am sending you the ODT via e-mail.

Thanks!

Kind regards,

No problem, errors happen. I have seen inconsistant behaviour between LT-server, LT-standalone and LT-LibreOffice before, and there is even a bug I filed related to it. Sentence segmentation method is different.
I have looked into the code already regarding that, but that is an issue that requires more time to solve than what I am willing to spend on it, at the moment.
If the error is too specific, try to just delete the segment and rewrite. Nothing can be done regarding special characters or special formats, specially on LO. For example:

@tiagosantos

Tiago, I have created a new rule:
sob o ponto de vista” > “do ponto de vista”

Feel free to improve it:
“sob o MEU/TEU/SEU/NOSSO/VOSSO ponto de vista”

I can’t remember how to add words that may or may not exist.

Thanks!

EDIT: added SEU/NOSSO above

Good one. I didn’t knew there was a debate on this one. But this should be on the “Style” category with an URL explaining it. Is this the best?

Add min='0' to the token to make it optional. Next update I add all those improvements. No worries.

Thank you, @tiagosantos

@tiagosantos

I was on Facebook and saw this mistake:
“Temos de por em prática tudo o que aprendemos!”

I was thinking about creating a rule that suggests “pôr” but I was wondering if the rule should be created to match the words “POR EM” or if there are more matches to be checked.

Could you advice?

Thanks!

This can be very useful.
I believe that the best is to added a simple rule (detect both “de por” and “por em”) and correct after checking the regression tests. I can’t recall any exception, but they are bound to exist.

Thanks!

@tiagosantos

Nightly results of my “por > pôr” rule:

+Title: Beja
+Line 1, column 44, Rule ID: POR[1]
+Message: Substitua por 'pôr'.
+Suggestion: pôr
+A sua importância é atestada pelo facto de por lá passar uma das vias romanas.
+                                           ^^^                                
+

Should I remove the “de por” rule or is there a way to improve it?

The “por em” seems to be okay.

Thanks!

@tiagosantos

Thank you for fixing it.

Kind regards,

No worries. Best regards.

@tiagosantos

Hello Tiago,

I am not sure if this is a false positive.

LT flagged:
“Ele disse que quem estabelece a % de incapacidade é o médico a que vou na sexta.”

It suggest “à”.

Now I don’t know how to write the sentence.

Thanks!

Great question.
Seems like a false positive to me, though that made me have doubts about it too, since it does make logical sense to use ‘à’ for time expressions.
After today’s regression test results (that should be very verbose due to the NO_VERB rule correction) I will try to confirm and fix it.
This false positive is very misleading and needs to be addressed.

@tiagosantos

Hello Tiago,

I was translating this sentence for DALnet:
"O líder actual da Equipa de Documentação desde 2002, tradutor Alemão oficial"

LT flagged it saying it has no verb.

But, it seems to be well written.

:slight_smile:

Could you take a look?

Thanks!

This precise sentence can not trigger that rule, since it lacks any type of final punctuation.
If it indeed triggered the rule, you saw it with a final stop in the end of it, making it a sentence. It has indeed no verbs that I can recognize.
As such the sentence could be corrected as follows:

“O líder actual da Equipa de Documentação desde 2002 é o tradutor Alemão oficial”
or
“[Ele] é o líder actual da Equipa de Documentação desde 2002, tradutor Alemão oficial”

Oh… I see what you mean. The sentence with the quotes! Nice catch. I will try to add an exception to handle that situation, though it may be tricky.

Many thanks.