What if I remove the “o que” and just check for the pronoun and the verb?
Is it a better approach?
“Eu quero ganhar o Euromilhões” -> “Quero ganhar o Euromilhões”
“Eu tenho um grande carro” -> “Tenho um grande carro”
?
Thank you!
What if I remove the “o que” and just check for the pronoun and the verb?
Is it a better approach?
“Eu quero ganhar o Euromilhões” -> “Quero ganhar o Euromilhões”
“Eu tenho um grande carro” -> “Tenho um grande carro”
?
Thank you!
Hi Marco,
Looks good, but this may be referred as a style rule. It would be enough to add it to the Style category, and add to the message 'Para melhorar o estilo de escrita, …'
It would be better with some URL or reference attached to it.
You can generalize by removing ‘o que’, and by adding wildcards to the postag. For example:
<token postag_regexp="yes" postag="V...1S.+"></token>
To avoid false positives, you may wish to exclude all ambiguous words. Try this:
<token postag_regexp="yes" postag="V...1S.+"><exception negate_pos='yes' postag_regexp="yes" postag="V...1S.+"/></token>
Hello Tiago,
Here it is the commit:
I have no URL for it since the idea came while I was writing an e-mail or a document (I can’t remember).

I was watching the news and came up with an idea to a new rule:
“o mesmo período do ano anterior” -> “o período homólogo”
What is the best approach to do it? Shall I create a rule or add to redundancy?
Thanks!
Nice. I believe this fits in wordiness.txt.
Done:
Hello!
On Sunday I bought another grammar book at the supermarket.
I made a quick view of it and in one page it had a profession example (but I can’t find that page any more).
I was wondering if professions have been implemented in LT and, if not, do you know a place from where I can get them?
Example:
“o médico do coração” -> “o cardiologista”
If there is such a page, in which file should I add the rules?
Thank you!
Kind regards,
Hello Marco,
Try this:
http://pt.conscienciopedia.org/index.php/Lista_de_profissões 1
You will only have to type in the definitions like this:
médico do coração=cardiologista
médicos do coração=cardiologistas
médico dos olhos=oftalmologista
There are probably better lists, but this was the first decent one I found.
I can be added to wordiness.txt, but please, add as a separate section and later I’ll make a specific java rule for this list, with a better link and example.
Looks good. I haven’t found a good way to express this type of error. It is a mix between an eggcorn and a wordy expression. Do you have a good definition for this type of errors?
Ahhhhh… sorry Tiago, only now I noticed this post.
Maybe something like: “Incorrect names of professions” or “names of professions” or “addressing names of professions”?
This is the closest I can come up with.
Edit: or just “professions.txt”?
Edit2: “Incorrect usage of professions”?
I was reading the grammar book.
It is written there that some adjectives don’t use degree.
It gives an example with:
o MAIS principal/prévio/semanal.
So, I went to the page of text analysis and I got:
‘AQ0CS0|AQ0MS0’
Just wondering if I could commit this rule:
<rule id='ADJETIVO_SEM_GRAU' name="Adjetivo sem grau"> <!-- Created by Marco A.G.Pinto, Portuguese rule --> <pattern> <token>o</token> <token>mais</token> <token postag='AQ0CS0|AQ0MS0' postag_regexp='yes'></token> </pattern> <message>Este adjetivo não admite grau: <suggestion>\1 \3</suggestion>.</message> <suggestion>\1 \3</suggestion> <example correction="o principal">Isto é <marker>o mais principal</marker> a ter em conta.</example> </rule>
Does it recognise all the adjectives without degree?
Thank you!
Kind regards,
No problem.
Makes sense and fits, but given that we are trying to follow technical terms used by linguists, it would be better to identify the type of error better. It is a barbarism, but that applies to any type of non-standard Portuguese expression. When I find something appropriate, I’ll get back to you.
This would detect regular adjectives as well. There is no POS information for this type of words, so you have to name then individually like: token regexp='yes'>principal/prévio/semanal<
Hello!
I was attempting to create a rule but TESTRULES PT gives several errors:
<rule id='TEM_TÊM' name="Confusão: tem - têm"> <pattern> <token postag='DI0MP0|DI0FP0' postag_regexp='yes'></token> <marker> <token>tem</token> </marker> </pattern> <message>Substitua por <suggestion>têm</suggestion>.</message> <example correction="têm">Uns <marker>tem</marker> sorte no jogo.</example> </rule>
This was supposed to work with:
uns
umas
outros
outras
alguns
algumas
I must be stressed as I look at it and can’t find any typo.
Could you help?
Thank you!
Hi Marco,
The rule is perfect. No worries.
This is the disambiguation getting in the way. In this situation Uns acts as the subject (a noun NCMP000) or a pronoun (PI0MP000) when next to a verb.
Opening exceptions for DIs on this rule (P_V) would create too many false positives in other rules. I believe you named all or almost all of them so may I suggest enumerating the options in this situation?
Best regards,
Tiago Santos
Thanks!
I have added it:
Hello @tiagosantos
I was trying to create a rule:
“por em quanto” -> “por enquanto”
But “por em” triggers a rule:
“Vamos fazer isto por em quanto.”
Could you add an exception so that I may code the new rule?
Thank you!
Kind regards,
Hi Marco,
you can push the rule and then I change the priority for that one.
Anyway, that rule should be done as a sub-rule of the main “por em” rule group. If so, create an antipattern on the relevant rule.
Could you improve it and insert in the xml?
<rule id='POR_EM_QUANTO' name="Por enquanto">
<!-- Created by Marco A.G.Pinto and improved by Tiago F. Santos, Portuguese rule -->
<pattern>
<token>por</token>
<marker>
<token>em</token>
<token>quanto</token>
</marker>
</pattern>
<message>Substitua por <suggestion>enquanto</suggestion>.</message>
<example correction="enquanto">Por <marker>em quanto</marker> está a correr bem.</example>
</rule>
Thanks!
Kind regards,
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.
Thanks!
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”.
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.
S
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!
Hi Marco,
I think this case can be solved with disambiguation. I’ll look into it.
Regards
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 -->
<pattern>
<token inflected='yes'>preferir</token>
<token>antes</token>
</pattern>
<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>
</rule>
Thanks!
Same verb, no need to inject POSs. Try replacing: <match no='1' postag='V.+' postag_regexp='yes'>preferir</match> for this: \1
Thanks, it worked!
Hello,
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,
Hello!
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!
It’s org/languagetool/resource/pt/added.txt
Thank you, Daniel.
I have added:
|cibersegurança|cibersegurança|NCCS000|
|ciberdefesa|ciberdefesa|NCFS000|
|freeware|freeware|NCMS000|
|shareware|shareware|NCMS000|
Could you confirm it all is correct?
Thanks!
Looks good to me.
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?
Thanks!
The false positive in perita should be fixed now. Regarding web, it is indeed an unescapable barbarism, but:
That would be the neutral tag. For unusual combinations check:
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!
Looks good.
This should also be fixed now.
Yes, it is fixed, thanks. But I found another issues with the word “web”:
— Traduzir software/manuais/sítios web;
and
— Rever/traduzir documentação, textos e o sítio web da universidade.
Is it hard to fix before the official release, or does it require some effort?
Thank you!
Merry Christmas!
Sorry for sounding annoying, but if we write “site” in the text it suggests “sítio web” which then flags a concordance error:
Temos os melhores sítios web.
Temos o melhor sítio web.
Could you take a look at it before the official release tomorrow?
Thank you!
Hello!
The following sentence doesn’t flag a gender error:
A verdade é que com a problema respiratório o cenário alterou-se.
Is it possible for you to add it to the gender checking part?
This weekend I won’t go to my job since I am ill.
I will try to add some more words to the added.txt.
Thank you!
I can’t check this right now, but I will look into it, ASAP.
The remaining, as you might have noticed, was already handled.
Hello Tiago,
I have been adding dozens of POS to words.
For now I am checking the words of the Minho university speller.
After I finish it, I will install your version of the speller and recheck again.
Tiago, I was wondering if in the LibreOffice extension, you could change the text for foreign words from “Estrangeirismo” to “Os estrangeirismos devem estar entre aspas ou ser italizados.” just like the on-line grammar check.
In the add-on for Firefox, it says “pre” instead of “pos” for Portuguese in the combobox:

Thanks!
Just to be sure - the variant is the right one, only its name is wrong? If that’s the case, I can fix it. Please confirm.
Only the name is wrong, since the pt_PT speller that ships with LT is the reform one.
This should be fixed with the next release of the browser add-on, thanks for reporting it.
Many thanks Marco. That one slipped me for years. I had not updated that string when the dictionaries were changed. @dnaber Thank you for handling this.
I took care of the browser add-on, could you check the stand-alone version? It has its own translation file independent of the browser add-on.
Hello guys!
I am new here and this is my first contribution! ![]()
I’ve installed the LanguageTool in my servers in order to use it by my eLearning Platform. Everything is working smoothly and I am very happy.
But I’ve notice that some gender errors in Portuguese are not working as it works on Microsoft Word, for example.
There goes a phrase:
Desta forma é promovida um ambiente de trabalho saudável e com grandes chances de desenvolvimento dos funcionários dentro da empresa.
As “ambiente de trabalho” is a “male” word, “promovida” should be “promovido”, which is the gender rule for male words. This is a Gender Concordance error.
Hey thanks brother from another mother 
So I am using the Language Tool in my own server. How can I update it with your changes?
Thanks!!
There’s a daily snapshot at Index of /snapshots/ 1, or you could build the sources from github.
| Topic | Replies | Views | Activity |
|---|---|---|---|
| Proofreading API integration with TinyMCE | 298 | Mar 2024 | |
|
Create a language agnostic rule
|
15 | Oct 2024 | |
| Error on mvn clean package | 464 | Feb 2024 | |
| Rule “simple cases of passive voice” not working | 369 | Feb 2024 | |
| Mehr lokale eigene Wörterbücher | 27 | Nov 2024 |