Tested with warnings in testrules.sh.
Suggestions commented out in rule id=“ERRO_DE_CONCORDNCIA_DO_PLURAL_O_OS” until I figure a solution for the warnings.
Code below just needs Crtl-C + Ctrl-V.
<!-- Concordance error plural - AS > A --> <!-- Created by Tiago F. Santos, Portuguese rule, 2016-10-15 --> <rule id="ERRO_DE_CONCORDNCIA_DO_FEMININO_PLURAL_AS_A" name="Erro de concordância do feminino singular"> <pattern> <marker> <token postag='D[AI]0FP0|NCFP000|AQ0FP0' postag_regexp='yes'> <exception postag='CC|CS|RG|RN|SPS00' postag_regexp='yes'></exception></token> <token postag='NCFS000|AQ0FS0' postag_regexp='yes'> <exception postag='P[ID][0123][CFM][SP]000|CC|CS|RG|RN|SPS00' postag_regexp='yes'></exception></token> </marker> </pattern> <message>Erro de concordância do plural. <suggestion><match no="1" postag="(D[AI]0FS0|NCFS000|AQ0FS0)" postag_regexp="yes"/> <match no="2"/></suggestion> ou <suggestion><match no="1"/> <match no="2" postag="(NCFP000|AQ0FP0)" postag_regexp="yes"/></suggestion>. </message> <example correction='A vaca|As vacas'><marker>As vaca</marker> são malhadas.</example> </rule>
<!-- Concordance error plural - A > AS --> <!-- Created by Tiago F. Santos, Portuguese rule, 2016-10-15 --> <rule id="ERRO_DE_CONCORDNCIA_DO_FEMININO_PLURAL_A_AS" name="Erro de concordância do feminino plural"> <pattern> <marker> <token postag='D[AI]0FS0|NCFS000|AQ0FS0' postag_regexp='yes'> <exception postag='CC|CS|RG|RN' postag_regexp='yes'></exception></token> <token postag='NCFP000|AQ0FP0' postag_regexp='yes'> <exception postag='P[ID][0123][CFM][SP]000|CC|CS|RG|RN|SPS00' postag_regexp='yes'></exception></token> </marker> </pattern> <message>Erro de concordância do plural: <suggestion><match no="1" postag="(D[AI]0FP0|NCFP000|AQ0FP0)" postag_regexp="yes"/> <match no="2"/></suggestion> ou <suggestion><match no="1"/> <match no="2" postag="(NCFS000|AQ0FS0)" postag_regexp="yes"/></suggestion>. </message> <example correction='As vacas|A vaca'><marker>A vacas</marker> são malhadas.</example> </rule>
<!-- Concordance error plural - OS > O --> <!-- Created by Tiago F. Santos, Portuguese rule, 2016-10-15 --> <rule id="ERRO_DE_CONCORDNCIA_DO_MASCULINO_PLURAL_OS_O" name="Erro de concordância do masculino plural"> <pattern> <marker> <token postag='D[AI]0MP0|NCMP000|AQ0MP0' postag_regexp='yes'> <exception postag='CC|CS|RG|RN|SPS00' postag_regexp='yes'></exception></token> <token postag='NCMS000|AQ0MS0' postag_regexp='yes'> <exception postag='P[ID][0123][CFM][SP]000|CC|CS|RG|RN|SPS00' postag_regexp='yes'></exception></token> </marker> </pattern> <message>Erro de concordância do plural. <suggestion><match no="1" postag="(D[AI]0MS0|NCMS000|AQ0MS0)" postag_regexp="yes"/> <match no="2"/></suggestion> ou <suggestion><match no="1"/> <match no="2" postag="(NCMP000|AQ0MP0)" postag_regexp="yes"/></suggestion>. </message> <example correction='O cão|Os cães|Os cãos'><marker>Os cão</marker> está no pasto.</example> </rule>
`
Erro de concordância do plural.
</message>
<example correction=''><marker>O cães</marker> estão no pasto.</example>
</rule>
I will commit your rules shortly, but when you have the chance, please try to fix the suggestion issue as it looks bad in the stand-alone tool
Also, your: <!-- DOUBLE FINAL STOP -->
rule doesn’t pass the TESTRULES PT test, and, it is already built-in into LanguageTool so there is no need for the rule.
The existing ponctuation rule only suggests a change to a single final stop, not ellipsis. This is just one of a set of other pontuation rules. After I make it comply with testrules.sh I submit the remaining ones.
At least in my built (LO with LT 3.5) the pontuation rules are disabled by default and, even after I ativate them in the options they do not cover all the cases (commas, exclamation marks, hiphens, parentesis, etc.)[quote=“tiagosantos, post:21, topic:1107”]
<!-- <suggestion><match no=“1” postag=“(D[AI]0MP0|NCMP000|AQ0MP0)” postag_regexp=“yes”/> <match no=“2”/></suggestion> ou <suggestion><match no=“1”/> <match no=“2” postag=“(NCMS000|AQ0MS0)” postag_regexp=“yes”/></suggestion>. –>
[/quote]
That line is commented out so it is not used. If it causes problems elsewhere just delete it. I left it there so others can look at it and find the issue (or a possible underlying bug).
Sorry for being so argumentative. I am still getting the hang of this and I understand that the standards for inclusion in LT have to be higher than for personal use.
I was able to test now the stand-alone tool with the changes. It is actually faster to test the changes there.
I have not seen any problem with suggestions to my rules. The one that presented issues does not show suggestions, as I meantioned before.
Can you be more specific about what is the problem you see?
The help screen for that rule will have to remain like that until the bug is found. There is no wrong suggestion presented to the user, so, consider it a non implemented feature, like many others.
Now I send you verbal concordance rules. Tey were tested in LO and LT. Thanks to Daniel Naber assistance, they now also have URLs explaning the rules.
<!-- Concordance error person - I + Verb --> <!-- Created by Tiago F. Santos, Portuguese rule, 2016-10-16 --> <rule id="ERRO_DE_CONCORDNCIA_DO_NMERO_DO_VERBO_1S" name="Erro de concordância do número do verbo"> <pattern> <marker> <token>eu</token> <token min="0" max="2" postag='CS|RG|RN' postag_regexp='yes'/> <token postag='VM[CIS][CFIMPS][23]S0|VM[CIS][CFIMPS][123]P0' postag_regexp='yes'> <exception postag='VM[CIS][CFIMPS]1S0' postag_regexp='yes'></exception></token> </marker> </pattern> <message>Erro de concordância verbal.</message> <url>http://www.infoescola.com/portugues/concordancia-verbal/</url> <example correction=''><marker>Eu passeiam</marker> na praia.</example> </rule>
<!-- Concordance error person - We + Verb --> <!-- Created by Tiago F. Santos, Portuguese rule, 2016-10-16 --> <rule id="ERRO_DE_CONCORDNCIA_DO_NMERO_DO_VERBO_1P" name="Erro de concordância do número do verbo"> <pattern> <marker> <token>nós</token> <token min="0" max="2" postag='CS|RG|RN' postag_regexp='yes'/> <token postag='VM[CIS][CFIMPS][23]P0|VM[CIS][CFIMPS][123]S0' postag_regexp='yes'> <exception postag='VM[CIS][CFIMPS]1P0' postag_regexp='yes'></exception></token> </marker> </pattern> <message>Erro de concordância verbal.</message> <url>http://www.infoescola.com/portugues/concordancia-verbal/</url> <example correction=''><marker>Nós passeiam</marker> na praia.</example> </rule>
Regarding the corrections, there is indeed, in some cases, a suggestion of “o” being changed to “oo” (not a portuguese dictionary word)
Word “oo” is in the dictionary with postag “NCMP000”.
If this is unacceptable, we need remove this word from the dictionary, or remove “NCMP000” from suggestion like this: <suggestion><match no="1" postag="(D[AI]0MP0|AQ0MP0)" postag_regexp="yes"/> <match no="2"/></suggestion></message>
and rewrite correction in example.