Back to LanguageTool Homepage - Privacy - Imprint

[pt] Portuguese rule contribution/discussion

(Sergio Giustozzi) #181

Hi All,

Just using this thread as suggested to report a Euro Portuguese issue. It looks like the Portuguese-Portugal library doesn’t like perfectly fine 2nd person conjugations:

The tool suggests to replace with a formal treatment, but these verbs are all fine. Fixing this would reduce false flags significantly.


(Tiago F. Santos) #182

Blue highlights stands for style.
When you are addressing unknown people, the use of “tu” is consider informal and as such, potentially disrespectful. You may not have dealt with it yet, since it depends on the environment that you move in, and which people you usually address but this distinction is not unique to European Portuguese.

False positive is when a rule detects something that it is not meant to detect, but this rule was designed to detect this and it was actually designed to have only false negatives, which it does in a great amount.

Error types are designed independently, so, if this rule does not apply to your writing style, just click “Ignore this type of error”.

(Sergio Giustozzi) #183

Thanks for the details, Thiago. I was looking to reduce the number of these flags in the API, so we will try to disable the stylistic suggestions.


(Marco A.G.Pinto) #184


Hello Tiago!

I know you are a busy person, but I found a false positive:
“Vamos todos comer a sopa!”

Could you find some free time to improve this?

Thank you!

(Tiago F. Santos) #185

Hi Marco,

I think this case can be solved with disambiguation. I’ll look into it.


(Marco A.G.Pinto) #186


Hello Tiago,

I was trying to create a rule but it gives errors in TESTRULES PT.

What is wrong with this?:

<rule id='PREFERIR_ANTES' name="Preferir">
<!--      Created by Marco A.G.Pinto, Portuguese rule      -->
      <token inflected='yes'>preferir</token>
  <message>Substitua por <suggestion><match no='1' postag='V.+' postag_regexp='yes'>preferir</match></suggestion>.</message>
  <example correction="prefere">A Ana <marker>prefere antes</marker> a Matemática.</example>


(Tiago F. Santos) #187

Same verb, no need to inject POSs. Try replacing: <match no='1' postag='V.+' postag_regexp='yes'>preferir</match> for this: \1

(Marco A.G.Pinto) #188

Thanks, it worked!

(Marco A.G.Pinto) #189



Sorry for not being very active lately due to lack of free time.

I found a bug in the latest pt_PT.

When we use ": " it says it requires a space at the end, but the space is already there.

A few nightlies ago, LT for pt_PT wasn’t also suggesting the dash in some “-”.

Just two bug reports.

Thank you!

Kind regards,

(Marco A.G.Pinto) #190



Where is the file in which we add morphologic data.

I am unable to find it.

I want to add to it some words.

Thank you!

(Daniel Naber) #191

It’s org/languagetool/resource/pt/added.txt

(Marco A.G.Pinto) #192

Thank you, Daniel.

(Marco A.G.Pinto) #193


I have added:


Could you confirm it all is correct?


(Tiago F. Santos) #194

Looks good to me.

(Marco A.G.Pinto) #195


The following sentence seems to give two false positives:

A Ana é perita em páginas web.

I noticed “web” hasn’t got morphologic information.

How do I add it to added.txt since it is both plural and singular?


(Tiago F. Santos) #196

The false positive in perita should be fixed now. Regardingweb, it is indeed an unescapable barbarism, but:

That would be the neutral tag. For unusual combinations check:

(Marco A.G.Pinto) #197


I don’t want to screw up before the official release, so, to be sure:

web web NCFN000

Is this I need to add to added.txt?

Thank you!

(Tiago F. Santos) #198

Looks good.

(Marco A.G.Pinto) #199


A Ana é perita em páginas web.

Still gives a numeric error :frowning:

(Tiago F. Santos) #200

This should also be fixed now.