Skip to content

Commit

Permalink
Merge pull request #11007 from languagetool-org/lt_marcoagpinto_20241…
Browse files Browse the repository at this point in the history
…110_1641

[pt] Moved rule verbs/nouns down and improved it disambiguation.xml
  • Loading branch information
marcoagpinto authored Nov 10, 2024
2 parents 680c856 + 3a07ceb commit 4b5d3bf
Showing 1 changed file with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,19 +254,7 @@ USA
</pattern>
<disambig action="remove" postag="V.*"/>
</rule>
<rule> <!-- Used ChatGPT 4o to verify the results -->
<pattern>
<token postag="V.+" postag_regexp="yes"><exception postag_regexp='yes' postag='CS|RG|NC.+|AQ.+|CC|SPS.+|[DP].+'/></token>
<token regexp='yes' inflected='yes'>um|muito|pouco|vários|diversos|tal</token> <!-- Special PI.* that don't break rules -->
<marker>
<and>
<token postag="VMIP3S0|VMM02S0|VMSP2S0|VMIP2S0|VMN02S0|VMSF2S0|VMIP1S0" postag_regexp="yes"/> <!-- Removed "VMP00SM" not to break Premium -->
<token postag="NC.+" postag_regexp="yes"/>
</and>
</marker>
</pattern>
<disambig action="remove" postag="V.*"/>
</rule>
<!-- Rule regarding PI.+ moved to bottom -->
<rule>
<pattern> <!-- Used ChatGPT 4o to verify the results -->
<token postag="Z0.[PN].+" postag_regexp="yes"/>
Expand Down Expand Up @@ -3852,6 +3840,21 @@ USA
<disambig action="remove" postag="V.*"/>
</rule>

<rule id="PI_VERBS" name="Remove PI.+ followed by noun from appearing as verb"> <!-- Used ChatGPT 4o to verify the results -->
<!-- Had to move the rule down for it to work with all the PI.+ here -->
<pattern>
<token postag="V.+" postag_regexp="yes"><exception postag_regexp='yes' postag='CS|RG|NC.+|AQ.+|CC|SPS.+|[DP].+'/></token>
<token regexp='yes' inflected='yes'>um|muito|pouco|vários|diversos|tal|de:esse|em:esse</token> <!-- Special PI.+ that don't break rules -->
<marker>
<and>
<token postag="VMIP3S0|VMM02S0|VMSP2S0|VMIP2S0|VMN02S0|VMSF2S0|VMIP1S0" postag_regexp="yes"/> <!-- Removed "VMP00SM" not to break Premium -->
<token postag="NC.+" postag_regexp="yes"/>
</and>
</marker>
</pattern>
<disambig action="remove" postag="V.*"/>
</rule>

<rulegroup id="NATIONAL_PREFIXES" name="Ignore spelling in tagged words with national prefixes">
<rule>
<pattern>
Expand Down

0 comments on commit 4b5d3bf

Please sign in to comment.