<commit_before><?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/print.xsl" title="Pretty print" ?>
<?xml-stylesheet type="text/css" href="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/rules.css" title="Easy editing stylesheet" ?>
    <!--
 Portugues Disambiguation Rules for LanguageTool
 Copyright (C) 2016 <NAME>
-->
  <!DOCTYPE rules [
    <!ENTITY meses_ano_abrev "jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez">
    <!ENTITY meses_ano "janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro">
    <!ENTITY dias_semana_abrev "seg|ter|qua|qui|sex|sáb|dom">
    <!ENTITY dias_semana "segunda|terça|quarta|quinta|sexta|sábado|domingo">

    <!ENTITY contracoes_MS "ao|do|dum|dele|deste|desse|daquele|disto|disso|daquilo|doutro|no|num|nele|nesse|neste|naquele|nisto|nisso|naquilo|noutro|pelo|algum|mo|to|lho">
    <!ENTITY contracoes_FS "à|da|duma|dela|desta|dessa|daquela|doutra|na|numa|nela|nessa|nesta|naquela|noutra|pela|alguma|ma|ta|lha">
    <!ENTITY contracoes_MP "aos|dos|duns|deles|destes|desses|daqueles|doutros|nos|nuns|neles|nesses|nestes|naqueles|noutros|pelos|alguns|mos|tos|lhos">
    <!ENTITY contracoes_FP "às|das|dumas|delas|destas|dessas|daquelas|doutras|nas|numas|nelas|nessas|nestas|naquelas|noutras|pelas|algumas|mas|tas|lhas">

    <!ENTITY pronomes_retos "eu|tu|el[ea]s?|nós|vós">
    <!ENTITY pronomes_nao_ambiguos "ma|me|mo|mos|ta|te|to|tas|tes|tos|lha|lhe|lho|lhas|lhes|lhos|vos">

    <!ENTITY pontos_cardeais "norte|sul|este|oeste|ocidente|oriente|nascente|poente|nordeste|sudeste|noroeste|sudoeste">
    <!ENTITY numero_por_extenso_CP "três|quatro|cinco|seis|sete|oito|nove|dez|onze|doze|treze|catorze|quinze|dez[ae]sseis|dez[ae]ssete|dezoito|dezanove|vinte|trinta|quarenta|cinquenta|sessenta|setenta|oitenta|noventa|cem|mil">
    <!ENTITY numero_por_extenso_MS "um|(mi|bi|tri|quadri)lh?ião">
    <!ENTITY numero_por_extenso_FS "uma|dezena">
    <!ENTITY numero_por_extenso_MP "uns|dois|centos?|(duzent|trezent|quatrocent|quinhent|seiscent|setecent|oitocent|novecent)os|(mi|bi|tri|quadri)lh?i?ões">
    <!ENTITY numero_por_extenso_FP "umas|duas|dezenas|dúzias|centenas|(duzent|trezent|quatrocent|quinhent|seiscent|setecent|oitocent|novecent)as">

]>

<rules lang="pt" xsi:noNamespaceSchemaLocation="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/resource/disambiguation.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <!-- 		l18n from Spanish disambiguation.xml by <NAME>		-->
      <unification feature="number">
        <equivalence type="S">
          <token postag="(N.{2}|[ADP].{3}|V.{4})[SN].*" postag_regexp="yes"/>
        </equivalence>
        <equivalence type="P">
          <token postag="(N.{2}|[ADP].{3}|V.{4})[PN].*" postag_regexp="yes"/>
        </equivalence>
      </unification>
      <unification feature="gender">
        <equivalence type="M">
          <token postag="(N.|[ADP].{2}|V.{3})[CM].*" postag_regexp="yes"/>
        </equivalence>
        <equivalence type="F">
          <token postag="(N.|[ADP].{2}|V.{3})[CF].*" postag_regexp="yes"/>
        </equivalence>
      </unification>

    <rule id="WORKAROUND_MISSING_ADVERBS_POS" name="fix missing POS in adverbes">
    <!-- Created by <NAME>, Portuguese rule, 2017-07-24  -->
      <pattern>
          <token regexp="yes" postag='UNKNOWN|I|RG' postag_regexp='yes'>.*mente$</token>
      </pattern>
      <disambig action="add"><wd pos="RM"/></disambig>
      <example inputform="francamente[Francamente/I]" outputform="francamente[Francamente/I,francamente/RM]" type="ambiguous">Falou <marker>francamente</marker> em soluções.</example>
    </rule>

    <!--		multiwords.txt related			-->
  <rulegroup id="WORKAROUND_SENTENCE_TOKENIZATION" name="fix problems with sentence tokenization">
    <!-- 	Workaround retrieved from Catalan grammar.xml	-->
    <!--  TODO Verify SENT_END conflict between SRX Tokenizer and disambiguation -->
    <rule>
      <pattern>
          <token regexp="yes">[A-Z]</token>
        <marker>
          <token spacebefore="no">.</token>
        </marker>
          <token spacebefore="yes" postag="[VADSC].*" postag_regexp="yes" regexp="yes">\p{Lu}.*<exception postag="NP.*" postag_regexp="yes"/></token>
      </pattern>
      <disambig action="add"><wd pos="SENT_START"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">[A-Z]</token>
        <marker>
          <token spacebefore="no">.</token>
        </marker>
          <token spacebefore="yes" postag="[VADSC].*" postag_regexp="yes" regexp="yes">\p{Lu}.*<exception postag="NP.*" postag_regexp="yes"/></token>
      </pattern>
      <disambig action="add"><wd pos="SENT_END"/></disambig>
    </rule>
  </rulegroup>

  <rulegroup id="nomes_proprios_multiword" name="nomes proprios em multiwords">
    <!-- 	Rulegroup retrieved from Catalan grammar.xml	-->
    <rule id="nomeproprio2palavras_filtra" name="nome proprio 3 palavras">
      <pattern>
          <token postag="&lt;NP.+&gt;" postag_regexp="yes"/>
          <token postag="&lt;/NP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NP00000_"/><wd pos="NP00000_"/></disambig>
    </rule>
    <rule id="nomeproprio3palavras" name="nome proprio 3 palavras">
      <pattern>
          <token postag="&lt;NP.+&gt;" postag_regexp="yes"/>
        <marker>
          <token/>
        </marker>
          <token postag="&lt;/NP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="add"><wd lemma="NP" pos="NP00000_"/></disambig>
    </rule>
    <rule id="nomeproprio4palavras" name="nome proprio 4 palavras">
      <pattern>
          <token postag="&lt;NP.+&gt;" postag_regexp="yes"/>
        <marker>
          <token/>
          <token/>
        </marker>
          <token postag="&lt;/NP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="add"><wd lemma="NP" pos="NP00000_"/><wd lemma="NP" pos="NP00000_"/></disambig>
    </rule>
    <rule id="nomeproprio3palavras_filtra" name="nome proprio 3 palavras">
      <pattern>
          <token postag="&lt;NP.+&gt;" postag_regexp="yes"/>
          <token postag="NP00000"/>
          <token postag="&lt;/NP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NP00000_"/><wd pos="NP00000_"/><wd pos="NP00000_"/></disambig>
    </rule>
    <rule id="nomeproprio4palavras-filtra" name="nome proprio 4 palavras">
      <pattern>
          <token postag="&lt;NP.+&gt;" postag_regexp="yes"/>
          <token postag="NP00000"/>
          <token postag="NP00000"/>
          <token postag="&lt;/NP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NP00000_"/><wd pos="NP00000_"/><wd pos="NP00000_"/><wd pos="NP00000_"/></disambig>
    </rule>
  </rulegroup>
  <rulegroup id="nomcomú_multiword" name="noms comuns en multiwords">
    <!-- 	Rulegroup retrieved from Catalan grammar.xml	-->
    <rule id="nomecomum2palavras" name="nome comúm 2 palavras">
      <pattern>
        <marker>
          <token postag="&lt;NCFS000&gt;"/>
          <token postag="&lt;/NCFS000&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="NCFS000_"/><wd pos="AQ0FS0_"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;NCMS000&gt;"/>
          <token postag="&lt;/NCMS000&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="NCMS000_"/><wd pos="AQ0MS0_"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;NCMN000&gt;"/>
          <token postag="&lt;/NCMN000&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="NCMN000_"/><wd pos="AQ0MN0_"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;NCMN000&gt;"/>
          <token/>
          <token postag="&lt;/NCMN000&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="NCMN000_"/><wd pos="AQ0MN0_"/><wd pos="AQ0MN0_"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;RN&gt;"/>
          <token postag="&lt;/RN&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="RN"/><wd pos="RN"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;RN&gt;"/>
          <token/>
          <token postag="&lt;/RN&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="RN"/><wd pos="RN"/><wd pos="RN"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag="&lt;RN&gt;"/>
          <token/>
          <token/>
          <token postag="&lt;/RN&gt;"/>
      </pattern>
      <disambig action="replace"><wd pos="RN"/><wd pos="RN"/><wd pos="RN"/><wd pos="RN"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;RG&gt;"/>
          <token postag="&lt;/RG&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="RG"/><wd pos="RG"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;RG&gt;"/>
          <token/>
          <token postag="&lt;/RG&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="RG"/><wd pos="RG"/><wd pos="RG"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag="&lt;RG&gt;"/>
          <token/>
          <token/>
          <token postag="&lt;/RG&gt;"/>
      </pattern>
      <disambig action="replace"><wd pos="RG"/><wd pos="RG"/><wd pos="RG"/><wd pos="RG"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;SP000&gt;"/>
          <token postag="&lt;/SP000&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="SP000"/><wd pos="SP000"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;SP000&gt;"/>
          <token/>
          <token postag="&lt;/SP000&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="SP000"/><wd pos="SP000"/><wd pos="SP000"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag="&lt;SP000&gt;"/>
          <token/>
          <token/>
          <token postag="&lt;/SP000&gt;"/>
      </pattern>
      <disambig action="replace"><wd pos="SP000"/><wd pos="SP000"/><wd pos="SP000"/><wd pos="SP000"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;CS&gt;"/>
          <token postag="&lt;/CS&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="CS"/><wd pos="CS"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;CS&gt;"/>
          <token/>
          <token postag="&lt;/CS&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="CS"/><wd pos="CS"/><wd pos="CS"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag="&lt;CS&gt;"/>
          <token/>
          <token/>
          <token postag="&lt;/CS&gt;"/>
      </pattern>
      <disambig action="replace"><wd pos="CS"/><wd pos="CS"/><wd pos="CS"/><wd pos="CS"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag="&lt;I&gt;"/>
          <token postag="&lt;/I&gt;"/>
      </pattern>
      <disambig action="add"><wd pos="I"/><wd pos="I"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag="&lt;I&gt;"/>
          <token/>
          <token postag="&lt;/I&gt;"/>
      </pattern>
      <disambig action="add"><wd pos="I"/><wd pos="I"/><wd pos="I"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag="&lt;I&gt;"/>
          <token/>
          <token/>
          <token postag="&lt;/I&gt;"/>
      </pattern>
      <disambig action="add"><wd pos="I"/><wd pos="I"/><wd pos="I"/><wd pos="I"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;(_GN_|L_).*" postag_regexp="yes"/>
          <token postag="&lt;/(_GN_|L_).*" postag_regexp="yes"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="_GN_"/><wd pos="_GN_"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;(_GN_|L_).*" postag_regexp="yes"/>
          <token/>
          <token postag="&lt;/(_GN_|L_).*" postag_regexp="yes"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="_GN_"/><wd pos="_GN_"/><wd pos="_GN_"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag="&lt;(_GN_|L_).*" postag_regexp="yes"/>
        <marker>
          <token/>
        </marker>
          <token postag="&lt;/(_GN_|L_).*" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="_GN_"/></disambig>
    </rule>
  </rulegroup>
    <rule id="INTERJECTION" name="Interjeição">
      <pattern>
        <marker>
          <token postag="I"/>
          <token postag="I"/>
        </marker>
          <token regexp="yes">[.,;:!?…]</token>
      </pattern>
      <disambig action="replace"><wd pos="I"/><wd pos="I"/></disambig>
    </rule>
  <rulegroup id="VAN_GOGH" name="van Gogh">
    <!-- 	Rulegroup retrieved from Catalan grammar.xml	-->
    <rule>
      <pattern>
        <marker>
          <token>van</token>
        </marker>
          <token regexp="yes">(?-i)Aartsen|Agt|Allen|Asperen|Baaren|Basten|Beethoven|Beinum|Belin|Bommel|Bree|Buren|Campen|Dam|Delden|der|Dijk|Dine|Dong|Dyck|Egmond|Eyck|Gaal|Goethem|Gogh|Halen|Hauwe|Hemel|Immersel|Kempen|Lier|Maldere|Marwijk|Mill|Morrison|Nieuwkerk|Nistelrooy|Otterloo|Persie|Petegem|Ragin|Rensburg|Rompuy|Schalkwyk|Someren|Vaart|Val|Valen|Van|Vliet|Vlijmen|Wassenaer</token>
      </pattern>
      <disambig action="replace"><wd pos="NPCNSP0_"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">\p{Lu}.+</token>
        <marker>
          <token>van</token>
        </marker>
          <token regexp="yes">\p{Lu}.+</token>
      </pattern>
      <disambig action="replace"><wd pos="NPCNSP0_"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">\p{Lu}.+</token>
        <marker>
          <token>van</token>
        </marker>
          <token regexp="yes">den|der</token>
          <token regexp="yes">\p{Lu}.+</token>
      </pattern>
      <disambig action="replace"><wd pos="NPCNSP0_"/></disambig>
    </rule>
  </rulegroup>
    <rule id="DA_VINCI" name="da Vinci">
    <!-- 		Rule retrieved from Catalan grammar.xml		-->
      <pattern>
        <marker>
          <token>da</token>
        </marker>
          <token regexp="yes">(?-i)Cividale|Morte|Costa|Lingua|Língua|Gagliano|Palestrina|Perugia|Silva|Cunha|Gama|Viadana|Vinci</token>
      </pattern>
      <disambig action="replace"><wd pos="NPCNSP0_"/></disambig>
    </rule>
  <rulegroup id="NP_BRANDS" name="Brands and Trademarks">
    <rule>
      <pattern>
        <marker>
          <token regexp="yes">\w+[™®]$</token>
        </marker>
      </pattern>
      <filter class="org.languagetool.rules.pt.NoDisambiguationPortuguesePartialPosTagFilter"
             args="no:1 regexp:(\w+)[™®] postag_regexp:NP.+"/><!-- The filter is case-sensitive -->
      <disambig action="replace"><wd pos="NPCN000_"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token/>
          <token regexp="yes">[™®]</token>
      </pattern>
      <disambig action="replace"><wd pos="NPCN000_"/><wd pos="NPCN000_"/></disambig>
    </rule>
  </rulegroup>

    <rule id="SPS_SI" name="Preposição + Si">
    <!-- Si : Pronoun or Musical note				-->
    <!-- Created by <NAME>, Portuguese rule, 2016-11-19  -->
      <pattern>
          <token postag="SP.+" postag_regexp="yes"/>
        <marker>
          <token>si</token>
        </marker>
      </pattern>
      <disambig action="filter" postag="PP.+"/>
    </rule>

    <rule id="PP_D_V" name="Pronome + Pronome + Verbo">
    <!-- Created by <NAME>, Portuguese rule, 2017-07-15  -->
      <pattern>
          <token regexp='yes'>&pronomes_retos;</token>
        <marker>
          <token regexp='yes'>[nv]?[ao]s?</token>
        </marker>
          <token postag="V.+" postag_regexp="yes"/>
      </pattern>
      <disambig action="filter" postag="PP.+"/>
    </rule>

  <rulegroup id="SER_NOUN" name="'ser' como substantivo">
    <!-- Localized from Catalan by <NAME>, 2017-05-16  -->
    <rule>
      <pattern>
        <marker>
          <token postag="N.*" postag_regexp="yes" regexp="yes">ser|seres</token>
        </marker>
          <token regexp="yes">humanos?|vivos?</token>
      </pattern>
      <disambig action="filter" postag="N.*"/>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="D..MS." postag_regexp="yes"/>
          <token postag="NCMS000">ser</token><commit_msg>[pt] PAST_PARTCIPLE disambiguation rule added<commit_after><?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/print.xsl" title="Pretty print" ?>
<?xml-stylesheet type="text/css" href="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/rules.css" title="Easy editing stylesheet" ?>
    <!--
 Portugues Disambiguation Rules for LanguageTool
 Copyright (C) 2016 <NAME>
-->
  <!DOCTYPE rules [
    <!ENTITY meses_ano_abrev "jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez">
    <!ENTITY meses_ano "janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro">
    <!ENTITY dias_semana_abrev "seg|ter|qua|qui|sex|sáb|dom">
    <!ENTITY dias_semana "segunda|terça|quarta|quinta|sexta|sábado|domingo">

    <!ENTITY contracoes_MS "ao|do|dum|dele|deste|desse|daquele|disto|disso|daquilo|doutro|no|num|nele|nesse|neste|naquele|nisto|nisso|naquilo|noutro|pelo|algum|mo|to|lho">
    <!ENTITY contracoes_FS "à|da|duma|dela|desta|dessa|daquela|doutra|na|numa|nela|nessa|nesta|naquela|noutra|pela|alguma|ma|ta|lha">
    <!ENTITY contracoes_MP "aos|dos|duns|deles|destes|desses|daqueles|doutros|nos|nuns|neles|nesses|nestes|naqueles|noutros|pelos|alguns|mos|tos|lhos">
    <!ENTITY contracoes_FP "às|das|dumas|delas|destas|dessas|daquelas|doutras|nas|numas|nelas|nessas|nestas|naquelas|noutras|pelas|algumas|mas|tas|lhas">

    <!ENTITY pronomes_retos "eu|tu|el[ea]s?|nós|vós">
    <!ENTITY pronomes_nao_ambiguos "ma|me|mo|mos|ta|te|to|tas|tes|tos|lha|lhe|lho|lhas|lhes|lhos|vos">
    <!ENTITY pronomes_ambiguos "[ao]s?|mas|nos|se">

    <!ENTITY verbos_auxiliares_part_passado "ser|estar|ter|haver">

    <!ENTITY pontos_cardeais "norte|sul|este|oeste|ocidente|oriente|nascente|poente|nordeste|sudeste|noroeste|sudoeste">
    <!ENTITY numero_por_extenso_CP "três|quatro|cinco|seis|sete|oito|nove|dez|onze|doze|treze|catorze|quinze|dez[ae]sseis|dez[ae]ssete|dezoito|dezanove|vinte|trinta|quarenta|cinquenta|sessenta|setenta|oitenta|noventa|cem|mil">
    <!ENTITY numero_por_extenso_MS "um|(mi|bi|tri|quadri)lh?ião">
    <!ENTITY numero_por_extenso_FS "uma|dezena">
    <!ENTITY numero_por_extenso_MP "uns|dois|centos?|(duzent|trezent|quatrocent|quinhent|seiscent|setecent|oitocent|novecent)os|(mi|bi|tri|quadri)lh?i?ões">
    <!ENTITY numero_por_extenso_FP "umas|duas|dezenas|dúzias|centenas|(duzent|trezent|quatrocent|quinhent|seiscent|setecent|oitocent|novecent)as">

]>

<rules lang="pt" xsi:noNamespaceSchemaLocation="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/resource/disambiguation.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <!-- 		l18n from Spanish disambiguation.xml by <NAME>		-->
      <unification feature="number">
        <equivalence type="S">
          <token postag="(N.{2}|[ADP].{3}|V.{4})[SN].*" postag_regexp="yes"/>
        </equivalence>
        <equivalence type="P">
          <token postag="(N.{2}|[ADP].{3}|V.{4})[PN].*" postag_regexp="yes"/>
        </equivalence>
      </unification>
      <unification feature="gender">
        <equivalence type="M">
          <token postag="(N.|[ADP].{2}|V.{3})[CM].*" postag_regexp="yes"/>
        </equivalence>
        <equivalence type="F">
          <token postag="(N.|[ADP].{2}|V.{3})[CF].*" postag_regexp="yes"/>
        </equivalence>
      </unification>

    <rule id="WORKAROUND_MISSING_ADVERBS_POS" name="fix missing POS in adverbes">
    <!-- Created by <NAME>, Portuguese rule, 2017-07-24  -->
      <pattern>
          <token regexp="yes" postag='UNKNOWN|I|RG' postag_regexp='yes'>.*mente$</token>
      </pattern>
      <disambig action="add"><wd pos="RM"/></disambig>
      <example inputform="francamente[Francamente/I]" outputform="francamente[Francamente/I,francamente/RM]" type="ambiguous">Falou <marker>francamente</marker> em soluções.</example>
    </rule>

    <!--		multiwords.txt related			-->
  <rulegroup id="WORKAROUND_SENTENCE_TOKENIZATION" name="fix problems with sentence tokenization">
    <!-- 	Workaround retrieved from Catalan grammar.xml	-->
    <!--  TODO Verify SENT_END conflict between SRX Tokenizer and disambiguation -->
    <rule>
      <pattern>
          <token regexp="yes">[A-Z]</token>
        <marker>
          <token spacebefore="no">.</token>
        </marker>
          <token spacebefore="yes" postag="[VADSC].*" postag_regexp="yes" regexp="yes">\p{Lu}.*<exception postag="NP.*" postag_regexp="yes"/></token>
      </pattern>
      <disambig action="add"><wd pos="SENT_START"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">[A-Z]</token>
        <marker>
          <token spacebefore="no">.</token>
        </marker>
          <token spacebefore="yes" postag="[VADSC].*" postag_regexp="yes" regexp="yes">\p{Lu}.*<exception postag="NP.*" postag_regexp="yes"/></token>
      </pattern>
      <disambig action="add"><wd pos="SENT_END"/></disambig>
    </rule>
  </rulegroup>

  <rulegroup id="nomes_proprios_multiword" name="nomes proprios em multiwords">
    <!-- 	Rulegroup retrieved from Catalan grammar.xml	-->
    <rule id="nomeproprio2palavras_filtra" name="nome proprio 3 palavras">
      <pattern>
          <token postag="&lt;NP.+&gt;" postag_regexp="yes"/>
          <token postag="&lt;/NP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NP00000_"/><wd pos="NP00000_"/></disambig>
    </rule>
    <rule id="nomeproprio3palavras" name="nome proprio 3 palavras">
      <pattern>
          <token postag="&lt;NP.+&gt;" postag_regexp="yes"/>
        <marker>
          <token/>
        </marker>
          <token postag="&lt;/NP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="add"><wd lemma="NP" pos="NP00000_"/></disambig>
    </rule>
    <rule id="nomeproprio4palavras" name="nome proprio 4 palavras">
      <pattern>
          <token postag="&lt;NP.+&gt;" postag_regexp="yes"/>
        <marker>
          <token/>
          <token/>
        </marker>
          <token postag="&lt;/NP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="add"><wd lemma="NP" pos="NP00000_"/><wd lemma="NP" pos="NP00000_"/></disambig>
    </rule>
    <rule id="nomeproprio3palavras_filtra" name="nome proprio 3 palavras">
      <pattern>
          <token postag="&lt;NP.+&gt;" postag_regexp="yes"/>
          <token postag="NP00000"/>
          <token postag="&lt;/NP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NP00000_"/><wd pos="NP00000_"/><wd pos="NP00000_"/></disambig>
    </rule>
    <rule id="nomeproprio4palavras-filtra" name="nome proprio 4 palavras">
      <pattern>
          <token postag="&lt;NP.+&gt;" postag_regexp="yes"/>
          <token postag="NP00000"/>
          <token postag="NP00000"/>
          <token postag="&lt;/NP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NP00000_"/><wd pos="NP00000_"/><wd pos="NP00000_"/><wd pos="NP00000_"/></disambig>
    </rule>
  </rulegroup>
  <rulegroup id="nomcomú_multiword" name="noms comuns en multiwords">
    <!-- 	Rulegroup retrieved from Catalan grammar.xml	-->
    <rule id="nomecomum2palavras" name="nome comúm 2 palavras">
      <pattern>
        <marker>
          <token postag="&lt;NCFS000&gt;"/>
          <token postag="&lt;/NCFS000&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="NCFS000_"/><wd pos="AQ0FS0_"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;NCMS000&gt;"/>
          <token postag="&lt;/NCMS000&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="NCMS000_"/><wd pos="AQ0MS0_"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;NCMN000&gt;"/>
          <token postag="&lt;/NCMN000&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="NCMN000_"/><wd pos="AQ0MN0_"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;NCMN000&gt;"/>
          <token/>
          <token postag="&lt;/NCMN000&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="NCMN000_"/><wd pos="AQ0MN0_"/><wd pos="AQ0MN0_"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;RN&gt;"/>
          <token postag="&lt;/RN&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="RN"/><wd pos="RN"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;RN&gt;"/>
          <token/>
          <token postag="&lt;/RN&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="RN"/><wd pos="RN"/><wd pos="RN"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag="&lt;RN&gt;"/>
          <token/>
          <token/>
          <token postag="&lt;/RN&gt;"/>
      </pattern>
      <disambig action="replace"><wd pos="RN"/><wd pos="RN"/><wd pos="RN"/><wd pos="RN"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;RG&gt;"/>
          <token postag="&lt;/RG&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="RG"/><wd pos="RG"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;RG&gt;"/>
          <token/>
          <token postag="&lt;/RG&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="RG"/><wd pos="RG"/><wd pos="RG"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag="&lt;RG&gt;"/>
          <token/>
          <token/>
          <token postag="&lt;/RG&gt;"/>
      </pattern>
      <disambig action="replace"><wd pos="RG"/><wd pos="RG"/><wd pos="RG"/><wd pos="RG"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;SP000&gt;"/>
          <token postag="&lt;/SP000&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="SP000"/><wd pos="SP000"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;SP000&gt;"/>
          <token/>
          <token postag="&lt;/SP000&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="SP000"/><wd pos="SP000"/><wd pos="SP000"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag="&lt;SP000&gt;"/>
          <token/>
          <token/>
          <token postag="&lt;/SP000&gt;"/>
      </pattern>
      <disambig action="replace"><wd pos="SP000"/><wd pos="SP000"/><wd pos="SP000"/><wd pos="SP000"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;CS&gt;"/>
          <token postag="&lt;/CS&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="CS"/><wd pos="CS"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;CS&gt;"/>
          <token/>
          <token postag="&lt;/CS&gt;"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="CS"/><wd pos="CS"/><wd pos="CS"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag="&lt;CS&gt;"/>
          <token/>
          <token/>
          <token postag="&lt;/CS&gt;"/>
      </pattern>
      <disambig action="replace"><wd pos="CS"/><wd pos="CS"/><wd pos="CS"/><wd pos="CS"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag="&lt;I&gt;"/>
          <token postag="&lt;/I&gt;"/>
      </pattern>
      <disambig action="add"><wd pos="I"/><wd pos="I"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag="&lt;I&gt;"/>
          <token/>
          <token postag="&lt;/I&gt;"/>
      </pattern>
      <disambig action="add"><wd pos="I"/><wd pos="I"/><wd pos="I"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag="&lt;I&gt;"/>
          <token/>
          <token/>
          <token postag="&lt;/I&gt;"/>
      </pattern>
      <disambig action="add"><wd pos="I"/><wd pos="I"/><wd pos="I"/><wd pos="I"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;(_GN_|L_).*" postag_regexp="yes"/>
          <token postag="&lt;/(_GN_|L_).*" postag_regexp="yes"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="_GN_"/><wd pos="_GN_"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="&lt;(_GN_|L_).*" postag_regexp="yes"/>
          <token/>
          <token postag="&lt;/(_GN_|L_).*" postag_regexp="yes"/>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="_GN_"/><wd pos="_GN_"/><wd pos="_GN_"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag="&lt;(_GN_|L_).*" postag_regexp="yes"/>
        <marker>
          <token/>
        </marker>
          <token postag="&lt;/(_GN_|L_).*" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="_GN_"/></disambig>
    </rule>
  </rulegroup>
    <rule id="INTERJECTION" name="Interjeição">
      <pattern>
        <marker>
          <token postag="I"/>
          <token postag="I"/>
        </marker>
          <token regexp="yes">[.,;:!?…]</token>
      </pattern>
      <disambig action="replace"><wd pos="I"/><wd pos="I"/></disambig>
    </rule>
  <rulegroup id="VAN_GOGH" name="van Gogh">
    <!-- 	Rulegroup retrieved from Catalan grammar.xml	-->
    <rule>
      <pattern>
        <marker>
          <token>van</token>
        </marker>
          <token regexp="yes">(?-i)Aartsen|Agt|Allen|Asperen|Baaren|Basten|Beethoven|Beinum|Belin|Bommel|Bree|Buren|Campen|Dam|Delden|der|Dijk|Dine|Dong|Dyck|Egmond|Eyck|Gaal|Goethem|Gogh|Halen|Hauwe|Hemel|Immersel|Kempen|Lier|Maldere|Marwijk|Mill|Morrison|Nieuwkerk|Nistelrooy|Otterloo|Persie|Petegem|Ragin|Rensburg|Rompuy|Schalkwyk|Someren|Vaart|Val|Valen|Van|Vliet|Vlijmen|Wassenaer</token>
      </pattern>
      <disambig action="replace"><wd pos="NPCNSP0_"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">\p{Lu}.+</token>
        <marker>
          <token>van</token>
        </marker>
          <token regexp="yes">\p{Lu}.+</token>
      </pattern>
      <disambig action="replace"><wd pos="NPCNSP0_"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">\p{Lu}.+</token>
        <marker>
          <token>van</token>
        </marker>
          <token regexp="yes">den|der</token>
          <token regexp="yes">\p{Lu}.+</token>
      </pattern>
      <disambig action="replace"><wd pos="NPCNSP0_"/></disambig>
    </rule>
  </rulegroup>
    <rule id="DA_VINCI" name="da Vinci">
    <!-- 		Rule retrieved from Catalan grammar.xml		-->
      <pattern>
        <marker>
          <token>da</token>
        </marker>
          <token regexp="yes">(?-i)Cividale|Morte|Costa|Lingua|Língua|Gagliano|Palestrina|Perugia|Silva|Cunha|Gama|Viadana|Vinci</token>
      </pattern>
      <disambig action="replace"><wd pos="NPCNSP0_"/></disambig>
    </rule>
  <rulegroup id="NP_BRANDS" name="Brands and Trademarks">
    <rule>
      <pattern>
        <marker>
          <token regexp="yes">\w+[™®]$</token>
        </marker>
      </pattern>
      <filter class="org.languagetool.rules.pt.NoDisambiguationPortuguesePartialPosTagFilter"
             args="no:1 regexp:(\w+)[™®] postag_regexp:NP.+"/><!-- The filter is case-sensitive -->
      <disambig action="replace"><wd pos="NPCN000_"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token/>
          <token regexp="yes">[™®]</token>
      </pattern>
      <disambig action="replace"><wd pos="NPCN000_"/><wd pos="NPCN000_"/></disambig>
    </rule>
  </rulegroup>

    <rule id="SPS_SI" name="Preposição + Si">
    <!-- Si : Pronoun or Musical note				-->
    <!-- Created by <NAME>, Portuguese rule, 2016-11-19  -->
      <pattern>
          <token postag="SP.+" postag_regexp="yes"/>
        <marker>
          <token>si</token>
        </marker>
      </pattern>
      <disambig action="filter" postag="PP.+"/>
    </rule>

    <rule id="PP_D_V" name="Pronome + Pronome + Verbo">
    <!-- Created by <NAME>, Portuguese rule, 2017-07-15  -->
      <pattern>
          <token regexp='yes'>&pronomes_retos;</token>
        <marker>
          <token regexp='yes'>[nv]?[ao]s?</token>
        </marker>
          <token postag="V.+" postag_regexp="yes"/>
      </pattern>
      <disambig action="filter" postag="PP.+"/>
    </rule>

    <rule id="PAST_PARTCIPLE" name="Filtrar particípio passado">
    <!-- Created by <NAME>, Portuguese rule, 2017-08-02  -->
      <pattern>
          <token inflected='yes' regexp='yes'>&verbos_auxiliares_part_passado;</token>
        <marker>
          <token postag="V.P.+" postag_regexp="yes"/>
        </marker>
      </pattern>
      <disambig action="filter" postag="V.P.+"/>
      <example inputform="cometido[cometer/VMP00SM,cometido/AQ0MS0]" outputform="cometido[cometer/VMP00SM]" type="ambiguous">Todos tinham <marker>cometido</marker> graves erros.</example>
      <example inputform="desrespeitado[desrespeitado/AQ0MS0,desrespeitar/VMP00SM]" outputform="desrespeitado[desrespeitar/VMP00SM]" type="ambiguous">Ela tinha <marker>desrespeitado</marker> todos com a sua infantilidade.</example>
    </rule>

  <rulegroup id="SER_NOUN" name="'ser' como substantivo">
    <!-- Localized from Catalan by <NAME>, 2017-05-16  -->
    <rule>
      <pattern>
        <marker>
          <token postag="N.*" postag_regexp="yes" regexp="yes">ser|seres</token>
        </marker>
          <token regexp="yes">humanos?|vivos?</token>
      </pattern>
      <disambig action="filter" postag="N.*"/>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="D..MS." postag_regexp="yes"/>
          <token postag="NCMS000">ser</token>
{'fraction_non_alphanumeric': 0.20624521398791798, 'fraction_numerical': 0.015088346237839985, 'mean_word_length': 2.8003880146583318, 'pattern_counts': {'":': 0, '<': 1213, '<?xml version=': 2, '>': 1213, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 22}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1924470', 'n_tokens_mistral': 13700, 'n_tokens_neox': 12919, 'n_words': 1849}