<?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" ?>

    <!--
 Portuguese (Portugal - prereform + postreform) - Grammar and Typo Rules for LanguageTool.
 Copyright © 2016-2017 Tiago F. Santos (tiagofsantos81@sapo.pt)

 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
 version 2.1 of the License, or (at your option) any later version.

 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public
 License along with this library; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA

-->
  <!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 expressoes_de_tempo "(?:minuto|hora|dia|se(?:gundo|mana|mestre)|(?:bi|tri|quadri)mestre|ano|d(?:écada|ecénio)|mil[éê]nio|temp(?:o|orada)|época)s?|m(?:ês|eses)">

    <!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 hifen "[-‑]">

    <!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 art_detecao_paronimos "(d|n|pel)?(outr)?[ao]s?|de|em|(alg|d|n)?(um(a|as)?|uns)">

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

    <!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">

    <!ENTITY abreviaturas "(?:c(?:[bjpx]|o(?:[bqt]|n(?:s(?:e(?:[cq]|lh?)|t(?:el|r)?|uet)?|c(?:r(?:et)?|ess|l)?|f(?:e(?:it|d)|ls?)?|t(?:emp|ab|r)?|q(?:uil)?|d(?:ic)?|j(?:ug)?|hec|g)|m(?:b(?:in(?:at)?|ust)?|p(?:[lt]|a?r)?|e(?:nd|rc)|unic|dor|te)|r(?:[pv]|r(?:u(?:pt?|t)|esp)?|eogr?|ogr?)|s(?:m(?:o(?:gr?|l))?|ec)?|p(?:ul(?:at)?)?|l(?:omb|et|s)?|ord|gn)|a(?:[çbdfv]|t(?:a(?:rin|cr|l)|ó(?:pt?|l)|eg)?|l(?:[çd]|v(?:in)?|cogr?|igr?)|r(?:[dnpr]|t(?:ogr)?)|n(?:a(?:liz|d)|t)?|p(?:i[tx]|ac|t)?|us?|st)|i(?:[dgv]|n(?:[gz]|e[gm]|ol)?|r(?:urg|c)?|t(?:ol|t)?|en[ct]?|bern|ênc|cl)|r(?:i(?:m(?:inol)?|pt(?:og)?|st)|on(?:o[lm]|ôn)|esc|ust|éd|ôn)?|e(?:n(?:tr?|og)|r(?:âm|v)|lt?|s?t)?|h(?:a(?:nc(?:el)?|p)|i[ln]|ul)?|l(?:(?:ás?|a)s|i(?:ch|m)|ín)|u(?:l(?:in|t)?|t(?:el)?|rt)|(?:ál|ír)?c|(?:él|ya)t|ô[nv]|ênt?|óds?|fr?|vs?|âm|tv)|p(?:[fmp]|r(?:o(?:[cdmx]|v(?:[çb]|(?:in)?c|enç?|av)?|t(?:(?:es|é)t|o[cz])?|s(?:(?:té)?t|ôn|c)|p(?:ag|os|r)?|n(?:[úo]n)?|f(?:is?s)?|bl)|e(?:[ftv]|s(?:[ct]|id)?|c(?:ed|is)?|d(?:ic)?|p(?:os)?)|i(?:nc(?:ip)?|m(?:it)?|v)|á[ct]|ót)?|a(?:r(?:a(?:[gn]|ens|ib)|n(?:as)?|t(?:ic)?|ág|ôn|l)|l(?:eo(?:[bz]|nt(?:ol)?|gr?)|s)|t(?:r(?:[ôo]n)?|ol)|s(?:s[mrt]?|t)|ulist|g?g|q)?|e(?:[cjlq]|r(?:s(?:pect(?:iv)?)?|n(?:amb)?|f(?:um)?|ífr?|uv)|t(?:r(?:o(?:[lq]|gr?))?)?|d(?:iat|ag|ol|r)?|s[cqs]?|nt?)|o(?:s(?:(?:ses)?s|it)|l(?:í[ct]|in)?|t(?:am)?|[ér]t|pul|v)|s(?:i(?:c(?:o(?:(?:fis)?l|pat|gn)|an)?|q(?:uiat)?)|eud)|i(?:rot(?:[ée]c)?|s(?:ci)?c|auien|n[tx]|zz)|l(?:a(?:nej|t)|eb)?|u(?:b(?:lic)?|lv|g)|á(?:g[gs]?|tr)|g(?:to)?|[íd]l|t[os]|érs?|úbl?|ça?)|e(?:s(?:t(?:r(?:a(?:t(?:ég)?|ng)|ut)?|a(?:(?:tís)?t|d)|e(?:nogr?|reogr)|i[lm]|ét|on|ud)|p(?:e(?:c(?:i(?:alm|f)|t(?:rogr)?|íf)?|(?:leo)?l|t)|ir(?:it)?|ort)?|c(?:o(?:lást|c)|ult?|and|r)?|l(?:[ao]v)?|gr|ot|q)|x(?:p(?:l(?:o[rs]|et)?|er(?:im)?|ort|r)?|c(?:l(?:am)?|urs)|t(?:ens|rat)?|érc|ag|e)|n(?:[fgsx]|t(?:om(?:ol)?)?|c(?:[íi]cl)?|erg(?:ét)?|doc)|m(?:b(?:r(?:iol)?|al)?|p(?:r(?:és)?|ír)?|igr|ol)|t(?:n(?:o(?:l(?:og)?|gr?))?|i(?:m(?:ol)?|óp)|ol)|l(?:etr(?:o(?:[lmt]|din)|ôn)?|étr|ipt)|u(?:f(?:[êe]m|o[nr]|ôn)?|r)|c(?:l(?:es)?|o[ln]|d)|q(?:u(?:i[tv]|at))?|p(?:igr?|íst)|d(?:if|uc)?|fem|gíp|rud)|m(?:a(?:[jp]|r(?:[cgx]|(?:ti)?n|r(?:oq)?|inh?|anh|ít)|l(?:[gh]|a(?:c(?:ol)?|b))|g(?:n(?:[ei]t)?)?|t(?:ogros|ad|er)?|q(?:uinof)?|d(?:eir)?|i(?:úsc)?|ç(?:on)?|omet|nuf|sc)|e(?:t(?:a(?:f(?:ór|is)?|l(?:og|ur))|r(?:if|ol)?|á[ft]|eor|on)?|c(?:an(?:ogr)?|ân)?|r(?:c(?:ad)?|id)?|d(?:(?:ie)?v)?|m(?:or?)?|x(?:ic)?|ns)|i(?:c(?:ro(?:[glm]|fot|sc)|ol)|n(?:[gh]|úsc|er)|t(?:ôn|ol)?|st)|o(?:n(?:t(?:anh)?|ogr?)?|r(?:alid|f)|(?:çam)?b|e?d|ag|v)|u(?:seol|lt|n)|é(?:tr|d)|í(?:st|n)|á[qx]|Min|ús|ct|k)|t(?:e(?:r(?:m(?:o(?:d(?:inâm)?|m)|in(?:ol)?)?|a(?:p(?:êut)?|t(?:ol)?)|r(?:it)?)|c(?:n(?:o(?:gr?|l)|a)?|el|go|t)?|l(?:e(?:[fv]|c(?:om)?|gr?)|égr)?|mp(?:er)?|o[ls]|atr?|ô?n|st?)|r(?:a(?:ns(?:m(?:ont)?|(?:ob)?j|it|p)|b(?:alh)?|d(?:ic)?|t)|i(?:[btv]|m(?:est)?|g(?:on)?)|áf|op)?|o(?:p(?:o(?:[ln]|gr?)|ôn)|x(?:iol)?|rp|sc|n)|a(?:[bm]|(?:xi|r)d|ur(?:om)?|quigr|ng?|il)|i(?:p(?:o(?:gr|l))?|b(?:et)?|nt|r)|u(?:r(?:ism|c)?|n(?:is)?|p)|é(?:cn?|rm)|(?:êx|í)t|á[bt]|âm|óp|ôn|v)|s(?:[fgs]|i(?:d(?:er(?:o(?:téc|gr))?)?|m(?:b(?:[óo]l)?|pl)|n(?:[gt]|[ôo]n|éd)?|g(?:n(?:if)?|il)|l(?:v(?:ic)?|og)|s?t|b)|e(?:[lx]|r(?:[gv]|(?:ic)?ic|r(?:alh)?)|m(?:i(?:[cnt]|ol)|(?:ân|í)t)|p(?:tent)?|(?:ten)?t|c[rt]?|gs?|nt?|q?q)|u(?:b(?:j(?:unt)?|afls?|ord|var|st)|p(?:er[fl]|r[fls]|l)?|e?c|f?f|rr|j)|o(?:c(?:iol)?|v(?:iét)?|st|n)|a(?:[bcn]|p(?:at)?|gr|ls)|ân(?:s(?:cr)?)?|í(?:[lr]|mb|nt)|c(?:[hr]|ul)?|r(?:t?a)?|t(?:ac|o)|érv?|p?p|át|ól)|i(?:n(?:t(?:e(?:r(?:j(?:et)?|n(?:ac)?|r(?:og)?|amn)|gr|ns)|r(?:ans)?|j)?|d(?:o(?:ch|st|n)|i(?:an|v)|u(?:st|m)|e[ft]|úst)?|f(?:in(?:it)?|ant?|orm|er|l)?|v(?:e(?:st(?:ig)?|nç)|ariav)?|s(?:(?:ti)?t|cr|ep)?|c(?:oat|óg|s)?|gl?|us)|m(?:p(?:e(?:r(?:at|f)?|ss)|r(?:o[pr]|es)?|ort)?|i(?:gr|t))|r(?:r(?:eg)?|[ôo]n|a[nq]|l)|c(?:ono(?:gr?|l)|t)|lu(?:s(?:ion|tr)|m)|t(?:al(?:ian)?|ál)?|d(?:(?:ol)?ol|iot)|s(?:l(?:am)?|r)|b(?:ér|id)|[ou]g|at|gr)|f(?:[fgt]|o(?:[gsv]|t(?:o(?:an(?:ál)?|gr|m))?|r(?:m(?:ul)?|rag|t)|l(?:[hs]|cl?)?|n(?:ét|ol))?|i(?:s(?:[cl]|io(?:cr?|l)|pat)|to(?:ssoc|gr?|pat)|l(?:at|ol)?|g(?:ur|d)?|nl?)|r(?:a(?:(?:c?|n)c|g)|e(?:[gq]|nol)|ut(?:íf)?|ânc|ig)?|e(?:[mv]|r(?:r(?:ad|ov))?|n(?:[ôo]m)?|u?d|it)|a(?:rm(?:ac(?:ol)?)?|scs?|l?c|uv|m)|l(?:u(?:m(?:in)?|v)|oric|am|s)?|u(?:t(?:e?b|ur)?|lv|nd)|(?:s?|í)s|(?:ór)?m|áb)|d(?:e(?:[dv]|c(?:r(?:esc)?|l(?:in)?|or)?|s(?:e(?:mb|n)|cr?|in|us|p)?|m(?:o(?:nstr|cr?|gr?))?|p(?:r(?:ec)?|to?|s)?|f(?:in(?:it)?|ect)?|r(?:iv|m)|t(?:erm)?|ns)|i(?:[fr]|s(?:[cs]|fem|tr)|al(?:[ée]t)?|n(?:[âa]m)?|pl(?:om)?|d(?:át)?|m(?:in)?|[áo]?c)|o(?:g(?:m(?:át)?)?|c(?:um|s)?|m[íi]n)|a(?:[dt]|sim)|u(?:alid|r)|ra[mv]?|ó[lr]|pto|z)|h(?:i(?:p(?:o(?:(?:té)?t|c(?:or)?|l)|not(?:er)?|(?:ia|ó)t|érb|ál)|dr(?:o(?:[dm]|gr?|s?t)|ául)?|s(?:t(?:ol)?|p)|b(?:r(?:id)?)?|er(?:ôn)?|gr?|nd)|e(?:r(?:p(?:et(?:o(?:gr|l))?|ét)?|áld?|b)?|ort(?:ôn)?|lm(?:in)?|b[dr]|t)|o(?:m(?:o(?:[fn]|gr?)|eop|ôn)?|rt(?:ic)?|tent|nd?)|a(?:g(?:io(?:gr?|l))?|plol|st|b)|í(?:br?|p)|úng)|b(?:i(?:o(?:g(?:e(?:o(?:gr?)?|n)|ên|r)|t(?:ip(?:ol)?)?|q(?:uím)?|(?:di)?m|fís|l)|bl(?:i(?:o(?:[fl]|t(?:ec)?|gr?)|ôn))?|r(?:rel|m)|tr(?:ans)?|m(?:en)?|spd?|z)|o(?:l(?:iv)?|r[dgr]|êm|mb|t)|a(?:(?:lís)?t|ct(?:er)?|sq)|r(?:om(?:at)?|i[gt]|as|et)?|u(?:r(?:oc|l)|d)|e(?:ir|ng|rb)|á(?:lt|rb)|[bt]l|íbl?|úlg|m)|r(?:e(?:l(?:a(?:t(?:iv)?|ç)|ig|oj)?|s(?:t(?:r(?:it)?)?|ult)?|g(?:i(?:on|m)|ress)?|p(?:[aeo]rt|úb)?|c(?:ípr?|ip)?|t(?:rosp|ór)?|f(?:orm|l)?|d(?:uç)?|alid|vers|m)|a(?:dio(?:t(?:e[cr]|écn?)?|d(?:if)?|gr?|at|l)|c(?:ion)?|ll)|o(?:[dt]|mn)|u(?:[br]|ss)|i[bt]|úst|ád|g)|l(?:[blr]|i(?:[bg]|t(?:u(?:rg?|an)|o(?:gr?|l)|er(?:at)?)?|n(?:g(?:uíst)?)?|m(?:it)?|vr?)|a(?:t(?:oar|it)?|b(?:ora?t)?|p(?:id)?|n[çc]|u?d|ct|rg)|u(?:[gv]|(?:si)?t|n[df]|dol)|o(?:[cq]|g(?:íst)?|mb|ng)|e(?:g(?:isl)?|i?t|x)|í(?:ng|q)|égs?|tda|âm|óg)|g(?:e(?:o(?:[dln]|m(?:orf?)?|f(?:ís)?|g[nr]?)|n(?:eal|ét|ov)?|rm?|ôn)|r(?:a(?:f(?:o(?:sc|l))?|v)|oenl?|áf|d)?|l(?:ipto(?:[lt]|gr?)|o(?:tol|ss)|ót)|a(?:[rtv]|l(?:ic|v)?|[éu]l|sc)|u(?:at(?:em)?|in|tt|z)|in(?:ec(?:ol)?|ást)?|n(?:om)?|ó?t|ên|ír|ov)|o(?:r(?:t(?:o(?:gr(?:áf)?|p))?|n(?:it(?:ol)?)?|g(?:aniz)?|ig(?:i?n)?|d(?:in)?|ogr?|ôn|at)?|b(?:s(?:(?:te)?t|ol)?|ed|r)?|n(?:om(?:(?:ás|a)t)?|eol|ç)|f(?:t(?:alm)?|id)|c(?:ult?|ean|id)|u(?:r(?:iv)?|t)|p(?:tat|os|p)?|torr(?:in)?|dont|lig|str|z)|v(?:[bcl]|e(?:r(?:[bn]|s(?:if)?|os?s)|n(?:at|ez|d)?|l(?:oc)?|t(?:er)?|ct|g)|i(?:[gz]|t(?:ic|r)?|n(?:ic)?|dr?|ol)|o(?:[cgx]|l(?:[ls]|at)?)?|a(?:dm?|sc)|ul[cg])|n(?:o(?:[mv]|r(?:m(?:at)?|ueg)?|b(?:il)?|tic)|e(?:[gp]|o(?:guin|log|zel)|ut?r|erl)|a(?:[cpvz]|t(?:ur)?)|u(?:mism?|cl|tr)|i(?:cara)?g|áu[at]?|órd|úm)|a(?:[çagv]|d(?:[jm]|v(?:ers)?|it)|b(?:r(?:ev)?|s)|p(?:ass|rox)?|nt(?:on|r)?|r(?:ts?|om)|(?:tô)?m|lt|ss|ux)|u(?:n(?:i(?:[df]|v(?:ers)?))?|r(?:b(?:an)?|ol|ug)|t(?:ili[dt]|ópi|op)|cr(?:aí?n)?|lt|mb)|q(?:u(?:a(?:(?:n(?:ti)?|r)t|lif)?|i(?:nz(?:en)?|rom|mb)?|í(?:ch|m)?|est)|l)|j(?:u(?:[dln]|r(?:ispr?)?|st)|a(?:[mnpv]|rd(?:in)?)|o(?:[cg]|alh|rn)|es)|S(?:r(?:t?a|e)s|ubdiác|[ón]r|arg|áb)|z(?:o(?:o(?:t(?:[ée]c)?|l))?|end)|x(?:e(?:rogr?|nof)|i(?:log|n))|E(?:(?:mpree)?nd|XM[ªº]|xa|E)|I(?:l(?:mos?)?|nsc)|(?:Cato|Be)l|A(?:dmin|tt)|é(?:cl|tn)|R(?:esp|d)|T(?:rav|T)|í(?:nd|t)|D(?:rs|D)|Hares|Mrs?|ópt|Ltd|Jr|Pe|ca)">

    <!ENTITY precede_nome_proprio_F "(?:a(?:ssociação|venida)|balneário|c(?:anção|o(?:lec?ção|ligação|meta|ndecoração|pa))|d(?:esignadas?|istribuição)|es(?:cola|tação)|f(?:ragata|undação)|g(?:aleria|eração)|herdade|i(?:lha|niciativa|intitulada)|l(?:agoa|ei)|m(?:onte|useu)|novela|o(?:bra|rquestra)|pr(?:aça|ograma)|quinta|r(?:evista|ua)|s(?:erra|érie)|t(?:aça|ema|empestade)|universidade|versão)">
    <!ENTITY precede_nome_proprio_M "(?:c(?:oncurso|urso)|d(?:esigna(?:ção|dos?))|estilo|f(?:ilme|uracão)|galardão|i(?:mpério|nstituto|ntitulado)|l(?:ago|iceu|ivro)|m(?:onte|useu)|navio|pr(?:|émio|ojec?to)|r(?:egistr?o|eino|elatório|io)|t(?:ipo|eatro))">

    <!ENTITY operadores_matematicos "[-x\.·\*\/\^\|~¬±×÷ϐϑϒϕϰϱϴϵ϶؆؇‖′″‴⁀⁄⁒⁺⁻⁼⁽⁾₊₋₌₍₎∀∁∂∃∄∅∆∇∈∉∊∋∌∍∎∏∐∑−∓∔∕∖∗∘∙√∛∜∝∞∟∠∡∢∣∤∥∦∧∨∩∪∫∬∭∮∯∰∱∲∳∴∵∶∷∸∹∺∻∼∽∾∿≀≁≂≃≄≅≆≇≈≉≊≋≌≍≎≏≐≑≒≓≔≕≖≗≘≙≚≛≜≝≞≟≠≡≢≣≤≥≦≧≨≩≪≫≬≭≮≯≰≱≲≳≴≵≶≷≸≹≺≻≼≽≾≿⊀⊁⊂⊃⊄⊅⊆⊇⊈⊉⊊⊋⊌⊍⊎⊏⊐⊑⊒⊓⊔⊕⊖⊗⊘⊙⊚⊛⊜⊝⊞⊟⊠⊡⊢⊣⊤⊥⊦⊧⊨⊩⊪⊫⊬⊭⊮⊯⊰⊱⊲⊳⊴⊵⊶⊷⊸⊹⊺⊻⊼⊽⊾⊿⋀⋁⋂⋃⋄⋅⋆⋇⋈⋉⋊⋋⋌⋍⋎⋏⋐⋑⋒⋓⋔⋕⋖⋗⋘⋙⋚⋛⋜⋝⋞⋟⋠⋡⋢⋣⋤⋥⋦⋧⋨⋩⋪⋫⋬⋭⋮⋯⋰⋱⋲⋳⋴⋵⋶⋷⋸⋹⋺⋻⋼⋽⋾⋿]|\=|\+">
    <!ENTITY alfabeto_grego "[ΑαΝνΒβΞξΓγΟοΔδΠπΕεΡρΖζΣσςΗηΤτΘθΥυΙιΦφΚκΧχΛλΨψΜμΩω]">
    <!ENTITY unidades_de_medida "(?:(?:[khdcmnµfYZEPTGM]|da)?(?:[gmlsJNWCVSFTHΩ]|Hz|cd|lm|mol|Pa|Wb|rad|sr|lx|Bq|Gy|Sv|kat|Np|eV)(?:⁻)?[23¹²³]?|º[CFK]|cv|k?cal|mmHg|atm|bpm|ton|kWh|GWa|MWd|MWh|mAh|min)">

    <!ENTITY extensoes_de_ficheiros "aspx?|avi|bak|bat|bmp|cab|cfg|cgi|com|css|csv|dat|db|dbf|dll|docx?|eps|exe|flv|gif|html?|ibooks|ico|ini|jar|jpe?g|js|jsp|lnk|md|mdb|mid|mov|mp3|mp4|mpa|mpg|o[dt][tspfg]|pdf|php|pl|png|pps|pptx?|ps|psd|py|rss|sh|sql|svg|sys|tar|tif|tiff|tmp|txt|wav|wma|xhtml|xlsx?|xsl|xml|zipx?|7z">
    <!ENTITY dominios_internet "(?:cat|ae|ar|asia|at|au|be|bid|biz|br|ca|cc|cf|ch|cl|club|cn|co|com|cz|de|dk|edu|es|eu|fi|fr|ga|gdn|gov|gq|gr|hk|hu|id|ie|il|in|info|int|io|ir|it|jp|kiwi|kr|kz|life|link|loan|lt|me|men|mil|ml|mobi|mx|my|name|net|nl|no|nu|nz|online|org|party|pl|pro|pt|pw|racing|ro|ru|se|sg|shop|site|sk|space|store|su|tech|tk|top|tr|trade|tv|tw|ua|uk|us|vip|vn|wang|website|win|ws|xin|xyz|za)"><!-- the 100 most used + cat -->
]>

<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">

    <!-- Unification rules retrieved from galician grammar.xml - START-->
  <unification feature="number">
    <equivalence type="singular">
          <token postag="(?:[NZ]..|[ADP]...|V....)S.+" postag_regexp="yes"/>
    </equivalence>
    <equivalence type="plural">
          <token postag="(?:[NZ]..|[ADP]...|V....)P.+" postag_regexp="yes"/>
    </equivalence>
  </unification>

  <unification feature="gender">
    <equivalence type="masc">
          <token postag="(?:[NZ].|[ADP]..|V.....)[MC].+" postag_regexp="yes"/>
    </equivalence>
    <equivalence type="fem">
          <token postag="(?:[NZ].|[ADP]..|V.....)[FC].+" postag_regexp="yes"/>
    </equivalence>
  </unification>

  <unification feature="person">
    <equivalence type="first">
          <token postag="(?:V...|PP)1.+" postag_regexp="yes"/>
    </equivalence>
    <equivalence type="second">
          <token postag="(?:V...|PP)2.+" postag_regexp="yes"/>
    </equivalence>
    <equivalence type="third">
          <token postag="(?:V...|PP)3.+" postag_regexp="yes"/>
    </equivalence>
  </unification>
    <!-- Unification rules retrieved from galician grammar.xml - END  -->

    <!--rule id="WORKAROUND_MISSING_ADVERBS_POS" name="Fix missing POS in adverbes">
    < Created by Tiago F. Santos, Portuguese rule, 2017-07-24>
      <pattern>
          <token regexp="yes" postag='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			-->
    <!-- 	Workaround retrieved from Catalan grammar.xml	>
  <rulegroup id="WORKAROUND_SENTENCE_TOKENIZATION" name="Fix problems with sentence tokenization">
    <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_MS" name="Nome proprio 2 palavras - MS">
      <pattern>
          <token postag="&lt;NPMS.+&gt;" postag_regexp="yes"/>
          <token postag="&lt;/NP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NPMS000_"/><wd pos="NPMS000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO2PALAVRAS_FILTRA_MP" name="Nome proprio 2 palavras - MP">
      <pattern>
          <token postag="&lt;NPMP.+&gt;" postag_regexp="yes"/>
          <token postag="&lt;/NP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NPMP000_"/><wd pos="NPMP000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO2PALAVRAS_FILTRA_FS" name="Nome proprio 2 palavras - FS">
      <pattern>
          <token postag="&lt;NPFS.+&gt;" postag_regexp="yes"/>
          <token postag="&lt;/NP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NPFS000_"/><wd pos="NPFS000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO2PALAVRAS_FILTRA_FP" name="Nome proprio 2 palavras - FP">
      <pattern>
          <token postag="&lt;NPFP.+&gt;" postag_regexp="yes"/>
          <token postag="&lt;/NP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NPFP000_"/><wd pos="NPFP000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO2PALAVRAS_FILTRA_CN" name="Nome proprio 2 palavras - CN">
      <pattern>
          <token postag="&lt;NPCN.+&gt;" postag_regexp="yes"/>
          <token postag="&lt;/NPCN.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NPCN000_"/><wd pos="NPCN000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO3PALAVRAS_FS" name="Nome proprio 3 palavras">
      <pattern>
          <token postag="&lt;NPFS.+&gt;" postag_regexp="yes"/>
          <token/>
          <token postag="&lt;/NPFS.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="add"><wd pos="NPFS000_"/><wd lemma="NP" pos="NPFS000_"/><wd pos="NPFS000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO3PALAVRAS-FS-FILTRA" name="Nome proprio 3 palavras">
      <pattern>
          <token postag="&lt;NPFS.+&gt;" postag_regexp="yes"/>
          <token postag="NPFS000"/>
          <token postag="&lt;/NPFS.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NPFS000_"/><wd pos="NPFS000_"/><wd pos="NPFS000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO3PALAVRAS_MS" name="Nome proprio 3 palavras">
      <pattern>
          <token postag="&lt;NPMS.+&gt;" postag_regexp="yes"/>
          <token/>
          <token postag="&lt;/NPMS.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="add"><wd pos="NPMS000_"/><wd lemma="NP" pos="NPMS000_"/><wd pos="NPMS000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO3PALAVRAS-MS-FILTRA" name="Nome proprio 3 palavras">
      <pattern>
          <token postag="&lt;NPMS.+&gt;" postag_regexp="yes"/>
          <token postag="NPMS000"/>
          <token postag="&lt;/NPMS.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NPMS000_"/><wd pos="NPMS000_"/><wd pos="NPMS000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO3PALAVRAS_FP" name="Nome proprio 3 palavras">
      <pattern>
          <token postag="&lt;NPFP.+&gt;" postag_regexp="yes"/>
          <token/>
          <token postag="&lt;/NPFP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="add"><wd pos="NPFP000_"/><wd lemma="NP" pos="NPFP000_"/><wd pos="NPFP000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO3PALAVRAS-FP-FILTRA" name="Nome proprio 3 palavras">
      <pattern>
          <token postag="&lt;NPFP.+&gt;" postag_regexp="yes"/>
          <token postag="NPFP000"/>
          <token postag="&lt;/NPFP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NPFP000_"/><wd pos="NPFP000_"/><wd pos="NPFP000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO3PALAVRAS_MP" name="Nome proprio 3 palavras">
      <pattern>
          <token postag="&lt;NPMP.+&gt;" postag_regexp="yes"/>
          <token/>
          <token postag="&lt;/NPMP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="add"><wd pos="NPMP000_"/><wd lemma="NP" pos="NPMP000_"/><wd pos="NPMP000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO3PALAVRAS-MP-FILTRA" name="Nome proprio 3 palavras">
      <pattern>
          <token postag="&lt;NPMP.+&gt;" postag_regexp="yes"/>
          <token postag="NPMP000"/>
          <token postag="&lt;/NPMP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NPMP000_"/><wd pos="NPMP000_"/><wd pos="NPMP000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO4PALAVRAS_FS" name="Nome proprio 3 palavras">
      <pattern>
          <token postag="&lt;NPFS.+&gt;" postag_regexp="yes"/>
          <token/>
          <token/>
          <token postag="&lt;/NPFS.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="add"><wd pos="NPFS000_"/><wd lemma="NP" pos="NPFS000_"/><wd lemma="NP" pos="NPFS000_"/><wd pos="NPFS000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO4PALAVRAS-FS-FILTRA" name="Nome proprio 4 palavras">
      <pattern>
          <token postag="&lt;NPFS.+&gt;" postag_regexp="yes"/>
          <token postag="NPFS000"/>
          <token postag="NPFS000"/>
          <token postag="&lt;/NPFS.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NPFS000_"/><wd pos="NPFS000_"/><wd pos="NPFS000_"/><wd pos="NPFS000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO4PALAVRAS_MS" name="Nome proprio 3 palavras">
      <pattern>
          <token postag="&lt;NPMS.+&gt;" postag_regexp="yes"/>
          <token/>
          <token/>
          <token postag="&lt;/NPMS.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="add"><wd pos="NPMS000_"/><wd lemma="NP" pos="NPMS000_"/><wd lemma="NP" pos="NPMS000_"/><wd pos="NPMS000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO4PALAVRAS-MS-FILTRA" name="Nome proprio 4 palavras">
      <pattern>
          <token postag="&lt;NPMS.+&gt;" postag_regexp="yes"/>
          <token postag="NPMS000"/>
          <token postag="NPMS000"/>
          <token postag="&lt;/NPMS.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NPMS000_"/><wd pos="NPMS000_"/><wd pos="NPMS000_"/><wd pos="NPMS000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO4PALAVRAS_FP" name="Nome proprio 3 palavras">
      <pattern>
          <token postag="&lt;NPFP.+&gt;" postag_regexp="yes"/>
          <token/>
          <token/>
          <token postag="&lt;/NPFP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="add"><wd pos="NPFP000_"/><wd lemma="NP" pos="NPFP000_"/><wd lemma="NP" pos="NPFP000_"/><wd pos="NPFP000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO4PALAVRAS-FP-FILTRA" name="Nome proprio 4 palavras">
      <pattern>
          <token postag="&lt;NPFP.+&gt;" postag_regexp="yes"/>
          <token postag="NPFP000"/>
          <token postag="NPFP000"/>
          <token postag="&lt;/NPFP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NPFP000_"/><wd pos="NPFP000_"/><wd pos="NPFP000_"/><wd pos="NPFP000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO4PALAVRAS_MP" name="Nome proprio 3 palavras">
      <pattern>
          <token postag="&lt;NPMP.+&gt;" postag_regexp="yes"/>
          <token/>
          <token/>
          <token postag="&lt;/NPMP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="add"><wd pos="NPMP000_"/><wd lemma="NP" pos="NPMP000_"/><wd lemma="NP" pos="NPMP000_"/><wd pos="NPMP000_"/></disambig>
    </rule>
    <rule id="NOMEPROPRIO4PALAVRAS-MP-FILTRA" name="Nome proprio 4 palavras">
      <pattern>
          <token postag="&lt;NPMP.+&gt;" postag_regexp="yes"/>
          <token postag="NPMP000"/>
          <token postag="NPMP000"/>
          <token postag="&lt;/NPMP.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NPMP000_"/><wd pos="NPMP000_"/><wd pos="NPMP000_"/><wd pos="NPMP000_"/></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="NOME_COMÚM_MULTIWORD" name="Nomes comuns em multiwords">
    <!-- 	Rulegroup based on Catalan grammar.xml	-->
    <rule id="NOMECOMUM2PALAVRAS_FILTRA_FS" name="Nome proprio 2 palavras - FS">
      <pattern>
          <token postag="&lt;NCFS.+&gt;" postag_regexp="yes"/>
          <token postag="&lt;/NC.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NCFS000_"/><wd pos="AQ0FS0_"/></disambig>
    </rule>
    <rule id="NOMECOMUM2PALAVRAS_FILTRA_MS" name="Nome proprio 2 palavras - MS">
      <pattern>
          <token postag="&lt;NCMS.+&gt;" postag_regexp="yes"/>
          <token postag="&lt;/NC.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NCMS000_"/><wd pos="AQ0MS0_"/></disambig>
    </rule>
    <rule id="NOMECOMUM2PALAVRAS_FILTRA_FP" name="Nome proprio 2 palavras - FP">
      <pattern>
          <token postag="&lt;NCFP.+&gt;" postag_regexp="yes"/>
          <token postag="&lt;/NC.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NCFP000_"/><wd pos="AQ0FP0_"/></disambig>
    </rule>
    <rule id="NOMECOMUM2PALAVRAS_FILTRA_MP" name="Nome proprio 2 palavras - MP">
      <pattern>
          <token postag="&lt;NCMP.+&gt;" postag_regexp="yes"/>
          <token postag="&lt;/NC.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NCMP000_"/><wd pos="AQ0MP0_"/></disambig>
    </rule>
    <rule id="NOMECOMUM2PALAVRAS_FILTRA_MN" name="Nome proprio 2 palavras - MN">
      <pattern>
          <token postag="&lt;NCMN.+&gt;" postag_regexp="yes"/>
          <token postag="&lt;/NC.+&gt;" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="NCMN000_"/><wd pos="AQ0MN0_"/></disambig>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag_regexp='yes' postag="&lt;NCMN.+&gt;"/>
          <token/>
          <token postag_regexp='yes' postag="&lt;/NCMN.+&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 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>
        <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>
          <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>
  <rulegroup id="DA_VINCI" name="Da Vinci">
    <!-- 		Based on Catalan version		-->
    <rule>
      <pattern>
        <marker>
          <token>da</token>
        </marker>
          <token regexp="yes">(?-i)Cividale|Morte|Lingua|Língua|Gagliano|Palestrina|Perugia|Cunha|Gama|Viadana|Vinci</token>
      </pattern>
      <disambig action="replace"><wd pos="NPCNSP0_"/></disambig>
      <example type="untouched">De acordo com os dados no relatório esta quinta-feira apresentado na capital da Costa do Marfim…</example>
    </rule>
    <rule>
      <pattern>
          <token regexp='yes'>\p{Lu}\p{Ll}+</token>
        <marker>
          <token>da</token>
        </marker>
          <token regexp="yes">(?-i)Costa|Silva</token>
      </pattern>
      <disambig action="replace"><wd pos="NPCNSP0_"/></disambig>
      <example type="untouched">De acordo com os dados no relatório esta quinta-feira apresentado na capital da Costa do Marfim…</example>
    </rule>
  </rulegroup>
  <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="QUEM_VERBO" name="quem + verbo">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2018-07-08  -->
      <pattern>
          <token>quem</token>
        <marker>
        <and>
          <token postag="N.+" postag_regexp="yes"/>
          <token postag="V.+" postag_regexp="yes"/>
        </and>
        </marker>
      </pattern>
      <disambig action="filter" postag="V.+"/>
    </rule>

    <rule id="SPS_SI" name="Preposição + Si">
    <!-- Si : Pronoun or Musical note				-->
    <!-- Created by Tiago F. Santos, 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 Tiago F. Santos, 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="PAST_PARTICIPLE" name="Filtrar particípio passado">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2017-08-02  -->
    <rule>
      <pattern>
          <token inflected='yes' regexp='yes'>&verbos_auxiliares_part_passado;</token>
          <token postag='R.+' postag_regexp="yes" min='0' max='4'>
            <exception negate_pos='yes' postag='R.+' postag_regexp="yes"/></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>
    <!--example inputform="comprado[comprado/AQ0MS0,comprar/VMP00SM]" outputform="comprado[comprar/VMP00SM]" type="ambiguous">Tenho ao longo dos anos <marker>comprado</marker> livros.</example--> <!-- XXX testrules does not account for multiwords, but it is working -->
    </rule>
    <rule>
      <pattern>
          <token inflected='yes' regexp='yes'>&verbos_auxiliares_part_passado;</token>
          <token spacebefore='no' regexp='yes'>&hifen;</token>
          <token spacebefore='no' regexp='yes'>&pronomes_nao_ambiguos;|&pronomes_ambiguos;</token>
          <token postag='R.+' postag_regexp="yes" min='0' max='4'>
            <exception negate_pos='yes' postag='R.+' postag_regexp="yes"/></token>
        <marker>
          <token postag="V.P.+" postag_regexp="yes"/>
        </marker>
      </pattern>
      <disambig action="filter" postag="V.P.+"/>
      <example inputform="recordado[recordado/AQ0MS0,recordar/VMP00SM]" outputform="recordado[recordar/VMP00SM]" type="ambiguous">Todos tinham-se <marker>recordado</marker> do sucedido.</example>
    </rule>
  </rulegroup>

  <rulegroup id="FUTURO_PERIFRASICO" name="Filtrar futuro perifrásico">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2017-09-25  -->
    <rule>
      <pattern>
          <token inflected='yes' regexp='yes'>ir|vir|poder</token>
          <token postag='R.+' postag_regexp="yes" min='0' max='4'>
            <exception negate_pos='yes' postag='R.+' postag_regexp="yes"/></token>
        <marker>
          <token postag="VMN0000"/>
        </marker>
      </pattern>
      <disambig action="filter" postag="VMN0000"/>
      <example inputform="haver[haver/NCMS000,haver/VMN0000,haver/VMN01S0,haver/VMN03S0]" outputform="haver[haver/VMN0000]" type="ambiguous">Não vai <marker>haver</marker> votação.</example>
    </rule>
    <rule>
      <pattern>
          <token inflected='yes' regexp='yes'>ir|vir|poder</token>
          <token spacebefore='no' regexp='yes'>&hifen;</token>
          <token spacebefore='no' regexp='yes'>&pronomes_nao_ambiguos;|&pronomes_ambiguos;</token>
          <token postag='R.+' postag_regexp="yes" min='0' max='4'>
            <exception negate_pos='yes' postag='R.+' postag_regexp="yes"/></token>
        <marker>
          <token postag="VMN0000"/>
        </marker>
      </pattern>
      <disambig action="filter" postag="VMN0000"/>
    </rule>
  </rulegroup>

  <rulegroup id="SER_NOUN" name="'ser' como substantivo">
    <!-- Localized from Catalan by Tiago F. Santos, 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">
            <exception>o</exception></token>
          <token postag="NCMS000">ser</token>
        </marker>
      </pattern>
      <disambig action="filterall"/>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="D..MP." postag_regexp="yes"/>
          <token postag="NCMP000">seres</token>
        </marker>
      </pattern>
      <disambig action="filterall"/>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag="V.+" postag_regexp="yes" regexp="yes">ser|seres</token>
        </marker>
          <token>-</token>
          <token postag_regexp="yes" postag="&pronomes_nao_ambiguos;|se"/>
      </pattern>
      <disambig action="filter" postag="V.+"/>
    </rule>
    <rule>
      <pattern>
          <token postag_regexp="yes" postag="&pronomes_nao_ambiguos;|se"/>
        <marker>
          <token postag="V.+" postag_regexp="yes" regexp="yes">ser|seres</token>
        </marker>
      </pattern>
      <disambig action="filter" postag="V.+"/>
    </rule>
  </rulegroup>

    <rule id="NAO_ADVERB" name="Não como advérbio">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2017-07-28  -->
      <pattern>
        <marker>
          <token>não</token>
        </marker>
          <token postag_regexp='yes' postag='(R|V).+'/>
      </pattern>
      <disambig action="filter" postag="R.+"/>
    </rule>

    <rule id="ADVERB_VERB_SINGULAR" name="Advérbio Verbo/nome Nome Singular">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2017-09-27  	-->
      <pattern>
          <token postag="R.+" postag_regexp='yes'/>
        <marker>
        <and>
          <token postag="V.+" postag_regexp='yes'/>
          <token postag="(N|A.)..P.+" postag_regexp='yes'/>
        </and>
        </marker>
          <token postag="(N|A.)..S.+" postag_regexp='yes'>
            <exception negate_pos='yes' postag="(N|A.)..S.+" postag_regexp='yes'/></token>
      </pattern>
      <disambig action="filter" postag="V.+"/>
    </rule>

    <rule id="CERTO" name="Estar + Certo">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2017-11-30  -->
      <pattern>
          <token inflected='yes'>estar</token>
        <marker>
          <token regexp='yes'>cert[ao]s?</token>
        </marker>
      </pattern>
      <disambig action="filter" postag="A.+"/>
    </rule>

  <rulegroup id="CERCA_DE" name="'cerca de'">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2018-07-18  -->
    <rule>
      <pattern>
        <marker>
          <token>cerca</token>
        </marker>
          <token>de</token>
          <token regexp='yes'>&numero_por_extenso_CP;|&numero_por_extenso_FS;|&numero_por_extenso_FP;|&numero_por_extenso_MS;|&numero_por_extenso_MP;|mei[ao]</token>
      </pattern>
      <disambig action="replace" postag="RG"/>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token>cerca</token>
        </marker>
          <token>de</token>
          <token postag_regexp='yes' postag='NC.+'>
            <exception regexp='yes'>&numero_por_extenso_CP;|&numero_por_extenso_FS;|&numero_por_extenso_FP;|&numero_por_extenso_MS;|&numero_por_extenso_MP;|mei[ao]</exception></token>
      </pattern>
      <disambig action="filter" postag="N.+"/>
    </rule>
    <rule>
      <pattern>
          <token>cercas</token>
          <token>de</token>
        <marker>
          <token postag_regexp='yes' postag='NC.+'/>
        </marker>
      </pattern>
      <disambig action="filter" postag="N.+"/>
    </rule>
  </rulegroup>

  <rulegroup id="TAL_ADVERB" name="Locuções adverbiais com 'tal'">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2016-11-19  -->
    <rule>
      <pattern>
          <token>tal</token>
      </pattern>
      <disambig action="remove" postag="RG"/>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token>tal</token>
        </marker>
          <token min='0'>e</token>
          <token regexp="yes">como|qual</token>
      </pattern>
      <disambig action="replace" postag="RG"/>
    </rule>
    <rule>
      <pattern>
          <token>como</token>
        <marker>
          <token>tal</token>
        </marker>
      </pattern>
      <disambig action="replace" postag="RG"/>
    </rule>
    <rule>
      <pattern>
          <token>não</token>
          <token>há</token>
        <marker>
          <token>tal</token>
        </marker>
      </pattern>
      <disambig action="replace" postag="RG"/>
    </rule>
  </rulegroup>

  <rulegroup id="TEMPO_A_FIO" name="Locuções adverbiais de tempo">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2018-12-09  -->
    <rule>
      <pattern>
          <token regexp='yes'>&expressoes_de_tempo;</token>
          <token>a</token>
          <token>fio</token>
      </pattern>
      <disambig action="replace"><wd pos="RG"/><wd pos="RG"/><wd pos="RG"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp='yes'>tempos?</token>
          <token>sem</token>
          <token>fim</token>
      </pattern>
      <disambig action="replace"><wd pos="RG"/><wd pos="RG"/><wd pos="RG"/></disambig>
    </rule>
  </rulegroup>

  <rulegroup id="DE_FORMA_ADJECTIVE" name="De forma + adjectivo">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2017-10-04  -->
    <rule>
      <pattern>
          <token>de</token>
          <token>forma</token>
          <token postag="A..[CF]S.+" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="RG"/><wd pos="RG"/><wd pos="RG"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token>de</token>
          <token regexp='yes'>jeito|modo</token>
          <token postag="A..[CM]S.+" postag_regexp="yes"/>
      </pattern>
      <disambig action="replace"><wd pos="RG"/><wd pos="RG"/><wd pos="RG"/></disambig>
    </rule>
  </rulegroup>

    <!-- D_R_N : Det + Advérbio + Nome				-->
    <!-- 		l18n from Spanish disambiguation.xml by Tiago F. Santos		-->
    <rule id="D_R_N" name="Det + Adv + Nom">
      <pattern>
          <token postag="D.+" postag_regexp="yes"/>
        <marker>
          <token postag="R.*" postag_regexp="yes"/>
        </marker>
          <token postag="N.+" postag_regexp="yes">
            <exception>são</exception>
            <exception postag="(C|SP).*" postag_regexp="yes"/></token>
      </pattern>
      <disambig action="filter" postag="R.*"/>
    </rule>

    <!-- DDN : Determinante possesivo + Determinante indefinido + Nome -->
    <!-- 		l18n from Spanish disambiguation.xml by Tiago F. Santos		-->
    <rule id="DDN_U" name="Det + Nom + Adj">
      <pattern>
        <marker>
          <unify>
            <feature id="gender"/>
            <feature id="number"/>
          <token postag="D.+" postag_regexp="yes"/>
          <token postag="D.+" postag_regexp="yes"/>
          <token postag="N.+" postag_regexp="yes"/>
          </unify>
        </marker>
      </pattern>
      <disambig action="unify"/>
    </rule>

    <!-- DNA : Det + Nome + adjetivo-->
    <!-- 		l18n from Spanish disambiguation.xml by Tiago F. Santos		-->
    <rule id="DNA" name="Det + Nom + Adj">
      <pattern>
        <marker>
          <unify>
            <feature id="gender"/>
            <feature id="number"/>
          <token postag="D.+" postag_regexp="yes"/>
          <token postag="N.+" postag_regexp="yes"/>
          <token postag="A.+" postag_regexp="yes">
            <exception regexp='yes'>[sv]ão</exception></token>
          </unify>
        </marker>
      </pattern>
      <disambig action="unify"/>
      <example inputform="uma[um/DI0FS0,um/NCFS000,um/PI0FS000]" outputform="uma[um/DI0FS0]" type="ambiguous">É <marker>uma</marker> ocasião romântica.</example>
      <example type="untouched">É uma romântica ocasião.</example>
    </rule>

    <!-- DAN : Determinante + Adjetivo + Nome-->
    <!-- 		l18n from Spanish disambiguation.xml by Tiago F. Santos		-->
    <rule id="DAN" name="Det + Adj + Nom">
      <pattern>
        <marker>
          <unify>
            <feature id="gender"/>
            <feature id="number"/>
          <token postag="D.+" postag_regexp="yes"/>
          <token postag="A.+" postag_regexp="yes"/>
          <token postag="N.+" postag_regexp="yes">
            <exception postag="[DC].+" postag_regexp="yes"/>
            <exception regexp="yes">de|são</exception></token>
          </unify>
        </marker>
      </pattern>
      <disambig action="unify"/>
      <example inputform="uma[um/DI0FS0,um/NCFS000,um/PI0FS000]" outputform="uma[um/DI0FS0]" type="ambiguous">É <marker>uma</marker> romântica ocasião.</example>
      <example type="untouched">É uma ocasião romântica.</example>
    </rule>

    <!-- NSN : Nom + Nom/Prep + Nom/Adj = prep -->
    <!-- 		l18n from Spanish disambiguation.xml by Tiago F. Santos		-->
    <rule id="NSN" name="Nom + Nom/Prep + Nom/Adj">
      <pattern>
          <token postag="N.+" postag_regexp="yes">
            <exception postag="RN|CS" postag_regexp="yes"/></token>
        <marker>
          <token postag="SP.+" postag_regexp="yes">
            <exception postag="NP.+" postag_regexp="yes"/></token><!-- XXX for compatibility with multiwords. Odd priorities in disambiguation since rules are jumped -->
        </marker>
          <token postag="[NA].+" postag_regexp="yes"/>
      </pattern>
      <disambig action="filter" postag="S.+"/>
    </rule>

    <!-- ANA : Adj + Nom/Adj + Adj = Nom -->
    <!-- 		l18n from Spanish disambiguation.xml by Tiago F. Santos		-->
    <rule id="ANA" name="Adj + Nom/Adj + Adj">
      <pattern>
          <token postag="A.+" postag_regexp="yes">
            <exception postag="N.+" postag_regexp="yes"/></token>
        <marker>
        <and>
          <token postag="N.+" postag_regexp="yes">
            <exception postag="V.+" postag_regexp="yes"/></token>
          <token postag="A.+" postag_regexp="yes"/>
        </and>
        </marker>
          <token postag="A.+" postag_regexp="yes">
            <exception postag="N.+" postag_regexp="yes"/></token>
      </pattern>
      <disambig action="filter" postag="N.+"/>
    </rule>

  <rulegroup id="DET_VERBONOME" name="Det + Ver/Nom">
    <!-- Created by Tiago F. Santos, Portuguese rule  	-->
    <rule>
      <pattern>
          <token regexp="yes">&art_detecao_paronimos;
            <exception>nos</exception></token>
        <marker>
        <and>
          <token postag="N.+" postag_regexp="yes">
            <exception regexp='yes'>cercas?|são</exception></token>
          <token postag="V.+" postag_regexp="yes">
            <exception postag="VMN0000"/></token>
        </and>
        </marker>
      </pattern>
      <disambig action="remove" postag="V.+"/>
    <!--example type="ambiguous" inputform="cerca[cerca/NCFS000,cerca/RG,cercar/VMIP3S0,cercar/VMM02S0]" outputform="cerca[cerca/NCFS000,cerca/RG]">Dos <marker>cerca</marker> de 416 mil soldados que serviram, cerca de 60 mil...</example--><!-- XXX disambiguated by more specific CERCA_DE -->
      <example type="ambiguous" inputform="carpinteiro[carpinteirar/VMIP1S0,carpinteiro/NCMS000]" outputform="carpinteiro[carpinteiro/NCMS000]">O <marker>carpinteiro</marker> serra-te isso à medida.</example>
      <example type="untouched">Muitos destes “senhores dos mares” correm sérios riscos de deixarem de o <marker>ser</marker>.</example>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">&art_detecao_paronimos;
            <exception regexp='yes'>[ao]s?|nos</exception></token>
        <marker>
        <and>
          <token postag="N.+" postag_regexp="yes"/>
          <token postag="VMN0000"/>
        </and>
        </marker>
      </pattern>
      <disambig action="remove" postag="V.+"/>
      <example type="ambiguous" inputform="jantar[jantar/NCMS000,jantar/VMN0000,jantar/VMSF1S0,jantar/VMSF3S0]" outputform="jantar[jantar/NCMS000]">Um <marker>jantar</marker> à lareira parece-me bem.</example>
    </rule>
  </rulegroup>

    <!-- Verbo + Preposição: p.ex. 'a' como preposição depois do verbo	-->
    <!-- Created by Tiago F. Santos, Portuguese rule, 2016-11-15  	-->
    <!-- https://pt.wikipedia.org/wiki/A_(preposi%C3%A7%C3%A3o)		-->
  <rulegroup id="A_PREPOSIÇÂO" name="Verbo + a (preposição)">
    <rule>
      <pattern>
        <marker>
          <token>a</token>
        </marker>
          <token postag="[RZ].+" postag_regexp="yes"/>
      </pattern>
      <disambig action="filter" postag="S.+"/>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token>a</token>
        </marker>
          <token regexp='yes'>mim|ti|si|[nv]ós|el[ae]s?|cavalo|convite|domícilio|fim|par|poucos?|muitos?|princípio|tempo|favor|exemplo|rigor|sério|título</token>
      </pattern>
      <disambig action="filter" postag="S.+"/>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token>a</token>
        </marker>
          <token regexp='yes'>longo|sangue|todo</token>
          <token regexp='yes'>prazo|frio|custo</token>
      </pattern>
      <disambig action="filter" postag="S.+"/>
    </rule>
    <rule><!-- TODO too agressive. try disabling this rule in a day without many changes and see regression results -->
      <pattern>
          <token postag="V.+" postag_regexp="yes">
            <exception>para</exception></token>
          <token min='0' postag='R.' postag_regexp='yes'/>
        <marker>
          <token>a</token>
        </marker>
      </pattern>
      <disambig action="filter" postag="S.+"/>
    </rule>
    <rule>
      <pattern>
          <token regexp='yes'>restrit[ao]s?|próximo|daqui</token>
        <marker>
          <token>a</token>
        </marker>
      </pattern>
      <disambig action="filter" postag="S.+"/>
    </rule>
    <rule>
      <pattern>
          <token inflected='yes'>ser</token>
          <token postag='A.+' postag_regexp='yes'/>
        <marker>
          <token>a</token>
        </marker>
      </pattern>
      <disambig action="filter" postag="S.+"/>
    </rule>
  </rulegroup>

    <!--P_V Quando está a frente de um verbo, trata-se de um pronome-->
    <!-- 		l18n from Spanish disambiguation.xml by Tiago F. Santos		-->
    <rule id="P_V" name="Pronome + Verbo">
      <pattern>
        <marker>
        <and>
          <token postag="D.+" postag_regexp="yes"/>
          <token postag="[PN].+" postag_regexp="yes"/>
        </and>
        </marker>
          <token postag="V.+" postag_regexp="yes">
            <exception negate_pos='yes' postag="V.+" postag_regexp="yes"/></token>
      </pattern>
      <disambig action="filter" postag="P.+|N.+"/>
      <example type="untouched">Muito obrigada por esta viagem maravilhosa.</example>
      <example type="untouched">Escreva seu endereço aqui.</example>
      <example type="untouched">Durante seu reinado, os Durrani consolidaram em uma só nação.</example>
    </rule>

    <rule id="S_V" name="Preposição + Verbo">
    <!-- 		Created by Tiago F. Santos, 2017-07-15		-->
      <pattern>
          <token postag="SPS00" postag_regexp="no">
            <exception postag="SP.+" postag_regexp="yes" negate_pos='yes'/></token>
        <marker>
        <and>
          <token postag="V.+" postag_regexp="yes"/>
          <token postag="N.+" postag_regexp="yes"/>
        </and>
        </marker>
      </pattern>
      <disambig action="remove" postag="V.+"/>
      <example inputform="impacto[impactar/VMIP1S0,impacto/AQ0MS0,impacto/NCMS000]" outputform="impacto[impacto/AQ0MS0,impacto/NCMS000]" type="ambiguous">É uma obra com <marker>impacto</marker> ecológico relevante.</example>
      <example type="untouched">Ele não o fez de bom grado, mas era necessário.</example>
    </rule>

    <rule id="PARA_WORKAROUND" name="Para">
      <pattern>
          <token>
            <exception regexp="yes">el[ea]|carro</exception></token>
        <marker>
          <token>para</token>
        </marker>
          <token>
            <exception>em</exception></token>
      </pattern>
      <disambig action='remove' postag="V.+"/>
    </rule>

    <!--rule id="SD_V" name="Contração + Verbo"
        XXX Made redundant by AV rule improvements. Remove after 3.9 release -->
    <!-- 		Created by Tiago F. Santos, 2017-07-15		>
      <pattern>
          <token regexp='yes'>&art_detecao_paronimos;
            <exception>nos</exception></token>
        <marker>
        <and>
          <token postag="V.+" postag_regexp="yes"/>
          <token postag="N.+" postag_regexp="yes"/>
        </and>
        </marker>
      </pattern>
      <disambig action="remove" postag="V.+"/>
      <example inputform="impacto[impactar/VMIP1S0,impacto/AQ0MS0,impacto/NCMS000]" outputform="impacto[impacto/AQ0MS0,impacto/NCMS000]" type="ambiguous">Pelo <marker>impacto</marker> ecológico que tem, é relevante.</example>
      <example type="untouched">Ele não o fez de bom grado, mas era necessário.</example>
    </rule-->

    <!-- D_N Quando está diante de um nome, trata-se de um determinante.-->
    <!-- 		l18n from Spanish disambiguation.xml by Tiago F. Santos		-->
    <rule id="D_N" name="Artigo + Nome">
      <pattern>
        <marker>
          <token postag="D.+" postag_regexp="yes">
            <exception postag="R.*" postag_regexp="yes"/></token>
        </marker>
          <token postag="[PNA].*" postag_regexp="yes">
            <exception postag="V.+" postag_regexp="yes"/></token>
      </pattern>
      <disambig action="filter" postag="D.+"/>
    </rule>

    <!-- P_N Possesivo + nome -->
    <!-- 		l18n from Spanish disambiguation.xml by Tiago F. Santos		-->
    <rule id="PN" name="Pos + Nom ">
      <pattern>
        <marker>
          <unify>
            <feature id="gender"/>
            <feature id="number"/>
          <token postag="DP.+" postag_regexp="yes"/>
          <token postag="N.+" postag_regexp="yes">
            <exception postag="C.|S.*|R.*" postag_regexp="yes"/></token>
          </unify>
        </marker>
      </pattern>
      <disambig action="unify"/>
    <!--Example: seu irmão-->
    </rule>

    <rule id="PREPOSITION_SE" name="'Se' como preposição">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2017-08-28  	-->
      <pattern>
          <token regexp="yes">&hifen;</token>
        <marker>
          <token postag_regexp='yes' postag="P.+"  spacebefore='no'/>
        </marker>
      </pattern>
      <disambig action="filter" postag="P.+"/>
      <example inputform="se[se/CS,se/PP3CN000]" outputform="se[se/PP3CN000]" type="ambiguous">Testa-<marker>se</marker>.</example>
      <example inputform="o[o/DA0MS0,o/PD0MS000,o/PP3MSA00]" outputform="o[o/PD0MS000,o/PP3MSA00]" type="ambiguous">Testa-<marker>o</marker>.</example>
    </rule>

    <rule id="PREPOSICIONAL_PHRASES" name="Expressões prepositivas">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2017-09-06  	-->
      <pattern>
        <marker>
          <token regexp='yes'>face|frente|graças|quanto|referente|relativamente|rumo</token><!-- XXX do not add devido. needs agreement -->
        </marker>
          <token regexp='yes'>[aà]o?s?</token>
      </pattern>
      <disambig action="replace"><wd pos="SP000"/></disambig>
    </rule>

    <rule id="MESMO" name="Mesmo">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2017-09-27  	-->
      <pattern>
          <token postag_regexp='yes' postag="[DP].+"/><!-- TODO add S.+ after proper splitting -->
        <marker>
          <token>mesmo</token>
        </marker>
      </pattern>
      <disambig action="remove"><wd pos="RG"/></disambig>
    </rule>

    <rule id="TANTO_COMO" name="Tanto ... como ...">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2017-11-15  	-->
      <pattern>
        <marker>
          <token regexp="yes">tão|tanto</token>
        </marker>
          <token max='2'/>
          <token>como</token>
      </pattern>
      <disambig action="replace" postag="RG"/>
    </rule>

    <rule id="COR_DE_XXXX" name="Cores como adjetivo">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2017-11-18  	-->
      <pattern>
          <token postag="N.+" postag_regexp='yes'/>
        <marker>
          <token>cor</token>
          <token>de</token>
          <token regexp='yes'>c(?:afé|hocolate)|laranja|rosa|tijolo|vinho</token>
        </marker>
      </pattern>
      <disambig action="replace"><wd pos="AQ0CN0"/><wd pos="AQ0CN0"/><wd pos="AQ0CN0"/></disambig>
    </rule>

    <rule id="ALIMENTAR_EXPECTATIVAS" name="Expectativas">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2017-09-27  	-->
      <pattern>
        <marker>
        <and>
          <token postag="V.+" postag_regexp='yes'/>
          <token postag="[AN].+" postag_regexp='yes'/>
        </and>
        </marker>
          <token regexp='yes' min='0'>as?</token>
          <token regexp='yes'>expec?tativas?</token>
      </pattern>
      <disambig action="filter" postag="V.+"/>
    </rule>

    <rule id='PHONETIC_INFINITIVE_FIX' name='correção de infinitivo fonético'>
    <!-- Created by Tiago F. Santos, Portuguese rule, 2016-XX-XX  	-->
      <pattern>
          <token postag="VMN0000" regexp='yes'>.+[^r]$</token>
      </pattern>
      <disambig action="remove" postag="V.N.+"/>
    </rule>

    <rule id="PUNCT" name="Pontuação">
    <!-- 		l18n from Spanish disambiguation.xml by Tiago F. Santos		-->
      <pattern>
          <token regexp="yes">[.,;:!?…()\[\]&#8209;&#8210;&#8211;&#8212;&#8213;«»”“‘’'\-]|[\*×∗·\+\/÷:=]</token>
      </pattern>
      <disambig action="add"><wd pos="_PUNCT"/></disambig>
    </rule>
    <rule id="TRES_PONTOS" name="Reticencias">
    <!-- 		l18n from Catalan disambiguation.xml by Tiago F. Santos		-->
      <pattern>
          <token>.</token>
          <token>.</token>
          <token>.</token>
      </pattern>
      <disambig action="add"><wd pos="_TRESPONTOS"/><wd pos="_TRESPONTOS"/><wd pos="_TRESPONTOS"/></disambig>
    </rule>

  <rulegroup id="QUOT" name="Quotation marks">
    <!-- 		l18n from English disambiguation.xml by Tiago F. Santos		-->
    <rule>
      <pattern>
          <token postag="SENT_START"/>
        <marker>
          <token>&quot;</token>
        </marker>
      </pattern>
      <disambig postag="``"/>
      <example type="untouched">Examplo 'a'</example>
      <example type="untouched">Examplo &quot;a</example>
      <example type="ambiguous" inputform="&quot;[&quot;/'',&quot;/``]" outputform="&quot;[&quot;/``]"><marker>&quot;</marker>Um teste.</example>
    </rule>
    <rule>
      <pattern>
          <token>
            <exception regexp="yes">\p{Ps}</exception></token>
        <marker>
        <and>
          <token postag="``" spacebefore="no">&quot;</token>
          <token postag="''" spacebefore="no">&quot;</token>
        </and>
        </marker>
      </pattern>
      <disambig postag="''"/>
      <example type="untouched">Examplo 'a'</example>
      <example type="untouched">Examplo &quot;a</example>
      <example type="untouched">Examplo (&quot;a</example>
      <example type="ambiguous" inputform="&quot;[&quot;/'',&quot;/``]" outputform="&quot;[&quot;/'']">Um &quot;teste<marker>&quot;</marker>.</example>
    </rule>
    <rule>
      <pattern>
        <marker>
        <and>
          <token postag="''" spacebefore="yes">&quot;</token>
          <token postag="``" spacebefore="yes">&quot;</token>
        </and>
        </marker>
      </pattern>
      <disambig postag="``"/>
      <example type="untouched">Examplo 'a'</example>
      <example type="untouched">Examplo a&quot;</example>
      <example type="ambiguous" inputform="&quot;[&quot;/'',&quot;/``]" outputform="&quot;[&quot;/``]">Um <marker>&quot;</marker>teste&quot;.</example>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">\p{Ps}</token>
        <marker>
        <and>
          <token postag="``" spacebefore="no">&quot;</token>
          <token postag="''" spacebefore="no">&quot;</token>
        </and>
        </marker>
      </pattern>
      <disambig postag="``"/>
      <example type="untouched">Examplo 'a'</example>
      <example type="untouched">Examplo &quot;a</example>
      <example type="untouched">Examplo a&quot;</example>
      <example type="ambiguous" inputform="&quot;[&quot;/'',&quot;/``]" outputform="&quot;[&quot;/``]">Um (<marker>&quot;</marker>teste&quot;.</example>
    </rule>
  </rulegroup>

  <rulegroup id="VERBOS_COMPOSTOS" name="Verbos compostos">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2018-07-08  	-->
    <rule>
      <pattern>
          <token inflected='yes'>levar</token>
          <token>a</token>
        <marker>
          <token>cabo</token>
        </marker>
      </pattern>
      <disambig action="replace" postag="RG"/>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token inflected='yes'>levar</token>
        </marker>
          <token>a</token>
          <token>cabo</token>
      </pattern>
      <disambig action="filter" postag="V.+"/>
    </rule>
  </rulegroup>

    <rule id="DEVE_SER" name="Deve + Infinitivo">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2018-07-08  	-->
      <pattern>
        <marker>
          <token inflected='yes'>dever</token>
        </marker>
          <token postag="VMN0000"/>
      </pattern>
      <disambig action="filter" postag="V.+"/>
    </rule>

  <rulegroup id="PERIFRASES" name="Perífrases de infinitivo">
    <rule>
    <!-- Created by Tiago F. Santos, Portuguese rule, 2018-07-04  	-->
      <pattern>
          <token inflected='yes'>ir</token>
          <token regexp='yes'>tod[ao]s</token>
        <marker>
          <token postag="VMN0000"/>
        </marker>
      </pattern>
      <disambig action="filter" postag="VMN0000"/>
    </rule>
    <!-- 		l18n from Galician disambiguation.xml by Tiago F. Santos		-->
    <rule>
      <pattern>
          <token inflected="yes" regexp="yes">haver|ter</token>
          <token>que</token>
        <marker>
          <token postag="VMN0000">
            <exception negate_pos="yes" postag="V.+" postag_regexp="yes"/></token>
        </marker>
      </pattern>
      <disambig postag="VMN0000"/>
    </rule>
    <rule>
      <pattern>
          <token inflected="yes" regexp="yes">estar|andar|levar|continuar|seguir|ser|colocar|começar|pegar|vir|chegar|voltar|tornar|romper|pôr</token>
          <token>a</token>
        <marker>
          <token postag="VMN0000">
            <exception negate_pos="yes" postag="V.+" postag_regexp="yes"/></token>
        </marker>
      </pattern>
      <disambig postag="VMN0000"/>
    </rule>
    <rule>
      <pattern>
          <token inflected="yes" regexp="yes">dever|haver|deixar|parar|acabar|rematar|terminar|vir|ter</token>
          <token>de</token>
        <marker>
          <token postag="VMN0000">
            <exception negate_pos="yes" postag="V.+" postag_regexp="yes"/></token>
        </marker>
      </pattern>
      <disambig postag="VMN0000"/>
    </rule>
    <rule>
      <pattern>
          <token inflected="yes">acabar</token>
          <token>por</token>
        <marker>
          <token postag="VMN0000">
            <exception negate_pos="yes" postag="V.+" postag_regexp="yes"/></token>
        </marker>
      </pattern>
      <disambig postag="VMN0000"/>
    </rule>
    <rule>
      <pattern>
          <token inflected="yes">estar</token>
          <token>para</token>
        <marker>
          <token postag="VMN0000">
            <exception negate_pos="yes" postag="V.+" postag_regexp="yes"/></token>
        </marker>
      </pattern>
      <disambig postag="VMN0000"/>
    </rule>
    <rule>
      <pattern>
          <token inflected="yes">dar</token>
          <token>em</token>
        <marker>
          <token postag="VMN0000">
            <exception negate_pos="yes" postag="V.+" postag_regexp="yes"/></token>
        </marker>
      </pattern>
      <disambig postag="VMN0000"/>
    </rule>
    <rule>
      <pattern>
          <token inflected="yes" regexp="yes">querer|ir|dever|haver|poder|voltar|adoptar|adotar|acostumar</token>
        <marker>
          <token postag="VMN0000">
            <exception negate_pos="yes" postag="V.+" postag_regexp="yes"/></token>
        </marker>
      </pattern>
      <disambig postag="VMN0000"/>
    </rule>
  </rulegroup>

    <rule id="VOGAIS" name="[^o|letra] e[subst|conj] (e[subst])">
    <!-- 		l18n from Galician disambiguation.xml by Tiago F. Santos		-->
      <pattern>
          <token>
            <exception regexp="yes">os?|letras?|voga(l|is)</exception></token>
        <marker>
          <token regexp="yes">[aeo]</token>
        </marker>
      </pattern>

      <disambig action="remove"><wd pos="NCMS000"/></disambig>
    </rule>

  <rulegroup  id="NUMBER_OF_TIMES" name="Número de vezes">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2016-11-15  	-->
    <rule>
      <pattern>
          <token>uma</token>
          <token>vez</token>
      </pattern>
      <disambig action="replace"><wd pos="RG"/><wd pos="RG"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">muitas|tantas|duas|&numero_por_extenso_CP;</token>
          <token>vezes</token>
      </pattern>
      <disambig action="replace"><wd pos="RG"/><wd pos="RG"/></disambig>
    </rule>
  </rulegroup>

  <rulegroup  id="NUMBER" name="Number">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2016-11-15  	-->
    <rule>
      <pattern>
          <token regexp="yes">[1234567890]+</token>
      </pattern>
      <disambig postag="Z0CN0"/>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">[1234567890][1234567890., ]+[1234567890]</token>
      </pattern>
      <disambig postag="Z0CN0"/>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">&numero_por_extenso_CP;</token>
      </pattern>
      <disambig action="add"><wd pos="Z0CP0"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">&numero_por_extenso_MP;
            <exception>uns</exception></token>
      </pattern>
      <disambig action="add"><wd pos="Z0MP0"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">&numero_por_extenso_FP;
            <exception>umas</exception></token>
      </pattern>
      <disambig action="add"><wd pos="Z0FP0"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">&numero_por_extenso_MS;</token>
      </pattern>
      <disambig action="add"><wd pos="Z0MS0"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">&numero_por_extenso_FS;</token>
      </pattern>
      <disambig action="add"><wd pos="Z0FS0"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag_regexp="yes" postag='Z0M[SPN]0'>
            <exception regexp='yes'>\d+</exception></token>
          <token postag_regexp="yes" postag='Z0[MC][SPN]0'/>
      </pattern>
      <disambig action="replace"><wd pos="Z0MP0"/><wd pos="Z0MP0"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag_regexp="yes" postag='Z0[CM][SPN]0'>
            <exception regexp='yes'>\d+</exception></token>
          <token postag_regexp="yes" postag='Z0M[SPN]0'/>
      </pattern>
      <disambig action="replace"><wd pos="Z0MP0"/><wd pos="Z0MP0"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag_regexp="yes" postag='Z0F[SPN]0'>
            <exception regexp='yes'>\d+</exception></token>
          <token postag_regexp="yes" postag='Z0[CF][SPN]0'/>
      </pattern>
      <disambig action="replace"><wd pos="Z0FP0"/><wd pos="Z0FP0"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag_regexp="yes" postag='Z0[CF][SPN]0'>
            <exception regexp='yes'>\d+</exception></token>
          <token postag_regexp="yes" postag='Z0F[SPN]0'/>
      </pattern>
      <disambig action="replace"><wd pos="Z0FP0"/><wd pos="Z0FP0"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag_regexp="yes" postag='Z0M[SPN]0'>
            <exception regexp='yes'>\d+</exception></token>
          <token regexp='yes'>e|-</token>
          <token postag_regexp="yes" postag='Z0[MC][SPN]0'/>
      </pattern>
      <disambig action="replace"><wd pos="Z0MP0"/><wd pos="Z0MP0"/><wd pos="Z0MP0"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag_regexp="yes" postag='Z0[CM][SPN]0'>
            <exception regexp='yes'>\d+</exception></token>
          <token regexp='yes'>e|-</token>
          <token postag_regexp="yes" postag='Z0M[SPN]0'/>
      </pattern>
      <disambig action="replace"><wd pos="Z0MP0"/><wd pos="Z0MP0"/><wd pos="Z0MP0"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag_regexp="yes" postag='Z0F[SPN]0'>
            <exception regexp='yes'>\d+</exception></token>
          <token regexp='yes'>e|-</token>
          <token postag_regexp="yes" postag='Z0[CF][SPN]0'/>
      </pattern>
      <disambig action="replace"><wd pos="Z0FP0"/><wd pos="Z0FP0"/><wd pos="Z0FP0"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token postag_regexp="yes" postag='Z0[CF][SPN]0'>
            <exception regexp='yes'>\d+</exception></token>
          <token regexp='yes'>e|-</token>
          <token postag_regexp="yes" postag='Z0F[SPN]0'/>
      </pattern>
      <disambig action="replace"><wd pos="Z0FP0"/><wd pos="Z0FP0"/><wd pos="Z0FP0"/></disambig>
    </rule>
  </rulegroup>

    <rule id="A_RANGE" name="Range">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2016-11-15  	-->
      <pattern>
          <token postag_regexp="yes" postag='Z.+'/>
        <marker>
          <token>a</token>
        </marker>
          <token postag_regexp="yes" postag='Z.+'/>
      </pattern>
      <disambig postag="SP000"/>
    </rule>

  <rulegroup id="ROMAN_NUMBER" name="Roman number">
    <!-- 		l18n from french and catalan disambiguation.xml by Tiago F. Santos		-->
    <rule>
      <pattern>
          <token regexp="yes" case_sensitive="yes">(?=[MDCLXVI])M*(C[MD]|D?C*)(X[CL]|L?X*)(I[XV]|V?I*)</token>
      </pattern>
      <disambig postag="ZRCN0"/>
    </rule>
    <rule>
      <pattern case_sensitive="yes">
        <marker>
          <token regexp="yes">(?=.)M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})</token>
        </marker>
      </pattern>
      <disambig action="add"><wd pos="AO0CN0"/></disambig>
    </rule>
    <rule>
      <pattern case_sensitive="yes">
        <marker>
          <token regexp="yes" spacebefore="yes">(?=.)m{0,4}(cm|cd|d?c{0,3})(xc|xl|l?x{0,3})(ix|i{0,3}|iv|v|viii?)
            <exception>li</exception></token>
        </marker>
      </pattern>
      <disambig action="add"><wd pos="AO0CN0"/></disambig>
    </rule>
    <rule>
      <pattern case_sensitive="yes">
          <token postag="SENT_START"/>
        <marker>
          <token regexp="yes">(?=.)m{0,4}(cm|cd|d?c{0,3})(xc|xl|l?x{0,3})(ix|i{0,3}|iv|v|viii?)
            <exception>li</exception></token>
        </marker>
      </pattern>
      <disambig action="add"><wd pos="AO0CN0"/></disambig>
    </rule>
    <rule>
      <pattern case_sensitive="yes">
          <token>-</token>
        <marker>
          <token regexp="yes">(?=.)m{0,4}(cm|cd|d?c{0,3})(xc|xl|l?x{0,3})(ix|i{0,3}|iv|v|viii?)
            <exception>li</exception></token>
        </marker>
      </pattern>
      <disambig action="add"><wd pos="AO0CN0"/></disambig>
    </rule>
    <rule>
      <pattern case_sensitive="yes">
          <token>-</token>
        <marker>
          <token regexp="yes">[ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯ]+</token>
        </marker>
      </pattern>
      <disambig action="add"><wd pos="AO0CN0"/></disambig>
    </rule>
  </rulegroup>

  <rulegroup id="PERCENTAGES" name="Percentagens">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2016-11-15  	-->
    <rule>
      <pattern>
          <token regexp="yes">[\d,. ]+[&#37;&#8240;&#8241;]
            <exception regexp='yes'>1[&#37;&#8240;&#8241;]</exception></token>
      </pattern>
      <disambig action="replace"><wd pos="NCMP000"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">1 ?[&#37;&#8240;&#8241;]</token>
      </pattern>
      <disambig action="replace"><wd pos="NCMC000"/></disambig>
    </rule>
  </rulegroup>

  <rulegroup id="DEGREES" name="Graus">
    <!-- Created by Tiago F. Santos, Portuguese rule  	-->
    <rule>
      <pattern>
          <token regexp="yes">1[º°′″‴][CFKNSEWO]?
            <exception>1º</exception></token>
      </pattern>
      <disambig action="replace"><wd pos="NCMS000"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">[\d,. ]+[º°′″‴][CFKNSEWO]?
            <exception regexp='yes'>1[º°′″‴].?</exception>
            <exception regexp='yes'>\d+º</exception></token>
      </pattern>
      <disambig action="replace"><wd pos="NCMP000"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">[º°][CFKNSEWO]</token>
      </pattern>
      <disambig action="replace"><wd pos="NCMN000"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">[\d,. ]*[º°′″‴][CFKNSEWO]</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
  </rulegroup>

  <rulegroup id="ORDINALS" name="Ordinais">
    <!-- Created by Tiago F. Santos, Portuguese rule 	-->
    <rule>
      <pattern>
          <token regexp='yes'>\d+[\.&#57347;]?[oº]</token>
      </pattern>
      <disambig action="replace"><wd pos="NCMS000"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">\d+[\.&#57347;]?[oº][sˢ]</token>
      </pattern>
      <disambig action="replace"><wd pos="NCMP000"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp='yes'>\d+[\.&#57347;]?ª</token>
      </pattern>
      <disambig action="replace"><wd pos="NCFS000"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp="yes">\d+[\.&#57347;]?[aª][sˢ]</token>
      </pattern>
      <disambig action="replace"><wd pos="NCFP000"/></disambig>
    </rule>
  </rulegroup>

  <rulegroup id="HOURS" name="Horas">
    <rule>
      <pattern>
          <token regexp='yes'>0?1h(\d{2}m)?(\d{2})?s?</token>
      </pattern>
      <disambig action="replace"><wd pos="NCFS000"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp='yes'>\d{1,2}h(\d{2}m)?(\d{2})?s?
            <exception regexp='yes'>0?1h(\d{2}m)?(\d{2})?s?</exception></token>
      </pattern>
      <disambig action="replace"><wd pos="NCFP000"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp='yes'>0?1\:(\d{2}\:)?(\d{2})?h?</token>
      </pattern>
      <disambig action="replace"><wd pos="NCFS000"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp='yes'>\d{1,2}\:(\d{2}\:)?(\d{2})?h?
            <exception regexp='yes'>0?1\:(\d{2}\:)?(\d{2})?h?</exception></token>
      </pattern>
      <disambig action="replace"><wd pos="NCFP000"/></disambig>
    </rule>
  </rulegroup>
  <rulegroup id="FILTER_PROPER_NAMES" name="Nomes próprios portugueses">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2018-11-23  	-->
    <rule>
      <pattern case_sensitive='yes'>
          <token postag='NP.+' postag_regexp='yes' regexp='yes'>\p{Lu}.+
            <exception scope='previous' postag='SENT_START' postag_regexp='yes'/></token>
      </pattern>
      <disambig action="filter" postag="N.+"/>
      <!--example inputform="Silva[Silva/NPCSG00,Silva/NPMSS00,silva/NCFS000]" outputform="Silva[Silva/NPCSG00,Silva/NPMSS00]" type="ambiguous">Isso são as ferramentas do <marker>Silva</marker>.</example XXX Works only for stricter rule (filter NP.+)-->
      <example inputform="São[São/NPMS000,ser/VMIP3P0,são/AQ0MS0,são/NCMS000]" outputform="São[São/NPMS000,são/NCMS000]" type="ambiguous">Cidade do México, <marker>São</marker> Paulo e Nova Iorque.</example>
      <example type="untouched">Costa alentejana... que saudades…</example>
    </rule>
    <rule>
      <pattern>
          <token regexp='yes'>Dona|Santa|Montanha|&precede_nome_proprio_F;</token>
          <token postag='NP.+' postag_regexp='yes' regexp='yes' case_sensitive='yes'>\p{Lu}.+</token>
      </pattern>
      <disambig action="replace"><wd pos="NPFS000"/><wd pos="NPFS000"/></disambig>
    </rule>
    <rule>
      <pattern>
          <token regexp='yes'>Monte|&precede_nome_proprio_M;</token>
          <token postag='NP.+' postag_regexp='yes' regexp='yes' case_sensitive='yes'>\p{Lu}.+</token>
      </pattern>
      <disambig action="replace"><wd pos="NPMS000"/><wd pos="NPMS000"/></disambig>
    </rule>
  </rulegroup>
  <rulegroup id="FOREIGN_PROPER_NAMES" name="Nomes estrangeiros">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2017-09-18  	-->
    <rule>
      <pattern case_sensitive='yes'>
          <token>La</token>
          <token postag='UNKNOWN' regexp='yes'>\p{Lu}.+</token>
      </pattern>
      <disambig action="replace"><wd pos="NPFS000"/><wd pos="NPFS000"/></disambig>
    </rule>
    <rule>
      <pattern case_sensitive='yes'>
          <token>Las</token>
          <token postag='UNKNOWN' regexp='yes'>\p{Lu}.+</token>
      </pattern>
      <disambig action="replace"><wd pos="NPFP000"/><wd pos="NPFP000"/></disambig>
    </rule>
    <rule>
      <pattern case_sensitive='yes'>
          <token>L</token><!-- XXX Le is also FP in Italian, but it is less common in Portuguese texts -->
          <token regexp='yes'>['’]</token>
          <token postag='UNKNOWN' regexp='yes'>\p{Lu}.+</token>
      </pattern>
      <disambig action="replace"><wd pos="NPMS000"/><wd pos="NPMS000"/><wd pos="NPMS000"/></disambig>
    </rule>
    <rule>
      <pattern case_sensitive='yes'>
          <token regexp='yes'>[AEI]l|Le</token><!-- XXX Le is also FP in Italian, but it is less common in Portuguese texts -->
          <token postag='UNKNOWN' regexp='yes'>\p{Lu}.+</token>
      </pattern>
      <disambig action="replace"><wd pos="NPMS000"/><wd pos="NPMS000"/></disambig>
    </rule>
    <rule>
      <pattern case_sensitive='yes'>
          <token regexp='yes'>Els|Los|Gli</token>
          <token postag='UNKNOWN' regexp='yes'>\p{Lu}.+</token>
      </pattern>
      <disambig action="replace"><wd pos="NPMP000"/><wd pos="NPMP000"/></disambig>
    </rule>
    <rule>
      <pattern case_sensitive='yes'>
          <token>Les</token>
          <token postag='UNKNOWN' regexp='yes'>\p{Lu}.+</token>
      </pattern>
      <disambig action="replace"><wd pos="NPCP000"/><wd pos="NPCP000"/></disambig>
    </rule>
  </rulegroup>

    <!-- XXX Ignore Spelling Rules XXX -->
    <!--rule id='CONTRATED_INFINITIVE' name='Formas verbais oxítonas'>
      <pattern>
          <token postag='VMX0000' postag_regexp='yes'/>
          <token regexp='yes' spacebefore='no'>&hifen;</token>
          <token regexp='yes' spacebefore='no'>l[ao]s?</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule-->
    <rule id="EN_VOGUE" name="En vogue">
      <pattern>
          <token>en</token>
          <token regexp="yes">vogue|gros|masse|passant|détail</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="COTE_DAZUR" name="Côte d'Azur">
      <pattern>
          <token>Côte</token>
          <token>d</token>
          <token regexp="yes">['’]</token>
          <token>Azur</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="LOS_ANGELES" name="Los Angeles">
      <pattern>
          <token>Los</token>
          <token regexp="yes">Alamos|Angeles</token>
      </pattern>
      <disambig action="immunize"/>
    </rule>
    <rule id="LAS_VEGAS" name="Las Vegas">
      <pattern case_sensitive="yes">
          <token>Las</token>
          <token>Vegas</token>
      </pattern>
      <disambig action="immunize"/>
    </rule>
    <rule id="VALLEYS" name="Valleys">
      <pattern case_sensitive="yes">
          <token regexp="yes">Death|Silicon</token>
          <token>Valley</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="OAK_RIDGE" name="Oak Ridge">
      <pattern case_sensitive="yes">
          <token>Oak</token>
          <token>Ridge</token>
      </pattern>
      <disambig action="immunize"/>
    </rule>
    <rule id="MISE_EN_SCENE" name="Mise en scène">
      <pattern>
          <token>Mise</token>
          <token>en</token>
          <token>scène</token>
      </pattern>
      <disambig action="immunize"/>
    </rule>
    <rule id="RHYTHM_AND_BLUES" name="Rhythm and Blues">
      <pattern>
          <token>Rhythm</token>
          <token>and</token>
          <token>Blues</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="ROCK_AND_ROLL" name="Rock and Roll">
      <pattern>
          <token>Rock</token>
          <token>and</token>
          <token>Roll</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="ALEXIUS_MEINONG" name="Alexius Meinong">
      <pattern>
          <token>Alexius</token>
          <token regexp="yes">Meinongs?</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="ALFRED_NOBEL" name="Alfred Nobel">
      <pattern>
          <token>Alfred</token>
          <token>Nobel</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="ADDIS_ABEBA" name="Addis Abeba">
      <pattern>
          <token>Addis</token>
          <token>Abeba</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="LA_PAZ" name="La Paz">
      <pattern>
          <token>La</token>
          <token>Paz</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="SANTO_DOMINGO" name="Santo Domingo">
      <pattern>
          <token>Santo</token>
          <token>Domingo</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="LE_HAVRE" name="Le Havre/Le Mans">
      <pattern>
          <token>Le</token>
          <token regexp='yes'>Havre|Mans</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="PHNOM_PENH" name="Phnom Penh">
      <pattern>
          <token>Phnom</token>
          <token>Penh</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="OPEN_SOURCE" name="Open Source">
      <pattern>
          <token>Open</token>
          <token>Source</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="OPEN_SOURCE_SOFTWARE" name="Open-Source-Software">
      <pattern>
          <token>Open-Source-Software</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="JUNGLE_WORLD" name="Jungle World">
      <pattern>
          <token>Jungle</token>
          <token>World</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="STONES" name="Rolling Stones">
      <pattern>
          <token>Rolling</token>
          <token regexp='yes'>Stones?</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="A_LA_CARTE" name="À la carte">
      <pattern>
          <token>à</token>
          <token>la</token>
          <token>carte</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="BIG_BEN" name="Big Ben">
      <pattern>
          <token>Big</token>
          <token regexp="yes">Ben|Data|Bang</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="PEU_A_PEU" name="Peu à peu">
      <pattern>
          <token>peu</token>
          <token>à</token>
          <token>peu</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="AVANT_LA_LETTRE" name="Avant la lettre">
      <pattern>
          <token>avant</token>
          <token>la</token>
          <token>lettre</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="COQ_AU_VIN" name="Coq au Vin">
      <pattern>
          <token>Coq</token>
          <token>au</token>
          <token>Vin</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="AIR_FORCE" name="Air Force">
      <pattern>
          <token>Air</token>
          <token>Force</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="CUI_BONO" name="Cui bono">
      <pattern>
          <token>Cui</token>
          <token>Bono</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="MEMENTO_MORI" name="Memento mori">
      <pattern>
          <token>Memento</token>
          <token>mori</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="SALVA_VERITATE" name="Salva veritate">
      <pattern>
          <token>salva</token>
          <token>veritate</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="PERSONA_NON_GRATA" name="Persona non grata">
      <pattern>
          <token>Persona</token>
          <token min="0">non</token>
          <token regexp="yes">(in)?grata</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="ENFANT_TERRIBLE" name="Enfant terrible">
      <pattern>
          <token>Enfant</token>
          <token>terrible</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="FAIR_PLAY" name="Fair Play">
      <pattern case_sensitive="yes">
          <token>Fair</token>
          <token>Play</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="UNIVERSITY_OF" name="University of">
      <pattern case_sensitive="yes">
          <token>University</token>
          <token>of</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="YAD_VASHEM" name="Yad Vashem">
      <pattern>
          <token>Yad</token>
          <token>Vashem</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="EL_NINO" name="El Niño">
      <pattern>
          <token>El</token>
          <token>Niño</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="IN_MEDIAS_RES" name="In medias res">
      <pattern>
          <token>in</token>
          <token>medias</token>
          <token>res</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="FACULTAS_DOCENDI" name="Facultas Docendi">
      <pattern>
          <token>Facultas</token>
          <token>Docendi</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="VENIA_LEGENDI" name="Venia Legendi">
      <pattern>
          <token>Venia</token>
          <token>Legendi</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="GRAND_CANYON" name="Grand Canyon">
      <pattern>
          <token>Grand</token>
          <token regexp='yes'>Canyon|Prix|Slam</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="HORRIBILE_DICTU" name="Horribile dictu">
      <pattern>
          <token>horribile</token>
          <token>dictu</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="DIABETES_MELLITUS" name="Diabetes mellitus">
      <pattern>
          <token>Diabetes</token>
          <token regexp="yes">mellitus|renalis|insipidus</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="O_BLITZ" name="O Blitz">
      <pattern>
          <token regexp="yes">[dn]?o</token>
          <token regexp="yes">Blitz|Donner</token>
          <token min='0'>Kebab</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="WALL_STREET" name="Wall Street">
      <pattern>
          <token regexp="yes">Wall|Downing|Baker</token>
          <token>Street</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="FIFTH_AVENUE" name="Fifth Avenue">
      <pattern>
          <token>Fifth</token>
          <token>Avenue</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="PER_SE" name="Per se">
      <pattern>
          <token>per</token>
          <token regexp="yes">capita|procura|rectum|saldo|se</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="POUR_LE_MERITE" name="Pour le Mérite">
      <pattern>
          <token>Pour</token>
          <token>le</token>
          <token>Mérite</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="SUI_GENERIS" name="Sui">
      <pattern>
          <token>sui</token>
          <token>generis</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="PACTA_SUNT_SERVANDA" name="Pacta">
      <pattern>
          <token>pacta</token>
          <token>sunt</token>
          <token>servanda</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="VIRTUAL_REALITY" name="Virtual">
      <pattern>
          <token>Virtual</token>
          <token regexp="yes">Reality|Environments?</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="GUELEN" name="Fethullah Gülen">
      <pattern>
          <token>Fethullah</token>
          <token regexp='yes'>Gülens?</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="ERDOGAN" name="Recep Tayyip Erdoğan">
      <pattern>
          <token>Recep</token>
          <token>Tayyip</token>
          <token regexp='yes'>Erdoğans?</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="HILLARY_CLINTON" name="Hillary Clinton">
      <pattern>
          <token regexp='yes'>Hillary|Bill</token>
          <token regexp='yes'>Clintons?</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="ABU_DHABI" name="Abu">
      <pattern>
          <token>Abu</token>
          <token>Dhabi</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="ROCKY_MOUNTAINS" name="Rocky Mountains">
      <pattern>
          <token>Rocky</token>
          <token>Mountains</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="CORDON_BLEU" name="Cordon bleu">
      <pattern>
          <token>Cordon</token>
          <token>bleu</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="JOUR_FIXE" name="Jour fixe">
      <pattern>
          <token regexp="yes">Blanc|Jour|Idée</token>
          <token>fixe</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="PEARL_HARBOR" name="Pearl Harbor">
      <pattern>
          <token>Pearl</token>
          <token>Harbor</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="ISLE_OF_MAN" name="Isle of Man">
      <pattern>
          <token>Isle</token>
          <token>of</token>
          <token regexp="yes">Man|Wight|Arran|Mull</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="HUMAN_RIGHTS_WATCH" name="Human Rights Watch">
      <pattern>
          <token>Human</token>
          <token>Rights</token>
          <token>Watch</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="PATER_FAMILIAS" name="Pater familias">
      <pattern>
          <token>pater</token>
          <token>familias</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="CON_CARNE" name="Con Carne">
      <pattern case_sensitive="yes">
          <token>con</token>
          <token>Carne</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="SCOTLAND_YARD" name="Scotland Yard">
      <pattern case_sensitive="yes">
          <token>Scotland</token>
          <token>Yard</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="BUCKINGHAM_PALACE" name="Buckingham Palace">
      <pattern>
          <token>Palácio</token>
          <token>de</token>
          <token>Buckingham</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="PARKS" name="Parks">
      <pattern case_sensitive="yes">
          <token regexp="yes">Central|Hyde</token>
          <token>Park</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="TERRA_INCOGNITA" name="Terra incognita">
      <pattern>
          <token>Terra</token>
          <token>incognita</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="NON_SEQUITUR" name="Non sequitur">
      <pattern>
          <token>non</token>
          <token>sequitur</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="REDUCTIO_AD_ABSURDUM" name="Reductio ad absurdum">
      <pattern>
          <token>reductio</token>
          <token>ad</token>
          <token>absurdum</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="TERTIUM_NON_DATUR" name="Tertium non datur">
      <pattern>
          <token>Tertium</token>
          <token>non</token>
          <token>datur</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="EX_NIHILO" name="Ex nihilo">
      <pattern>
          <token>ex</token>
          <token>nihilo</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="SUUM_CUIQUE" name="Suum cuique">
      <pattern>
          <token>suum</token>
          <token>cuique</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="URBI_ORBI" name="Urbi et orbi">
      <pattern>
          <token>Urbi</token>
          <token>et</token>
          <token>orbi</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="SPIRITUS_RECTOR" name="Spiritus Rector">
      <pattern>
          <token>Spiritus</token>
          <token>Rector</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="VINO_VERITAS" name="In vino veritas">
      <pattern>
          <token>in</token>
          <token>vino</token>
          <token>veritas</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="VENIA_VERBO" name="Sit venia verbo">
      <pattern>
          <token>sit</token>
          <token>venia</token>
          <token>verbo</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="SEX_CITY" name="Sex and the City">
      <pattern>
          <token>Sex</token>
          <token>and</token>
          <token>the</token>
          <token>City</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="BREAKING_BAD" name="Breaking Bad">
      <pattern>
          <token>Breaking</token>
          <token>Bad</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="VISUAL_STUDIO" name="Visual Studio/Basic">
      <pattern case_sensitive="yes">
          <token>Visual</token>
          <token regexp="yes">Studio|Basic</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="GOOGLE_MAPS" name="Google Maps">
      <pattern case_sensitive="yes">
          <token>Google</token>
          <token regexp="yes">Ad|Alerts|Analytics|APIs|App|Apps|Art|Attribution|Authenticator|Bookmarks|Business|Calendar|Charts|Checkout|Classroom|Cloud|Compute|Contacts|Cultural|Current|Data|Developers|Docs|Drive|Fit|Flights|Fonts|for|Fusion|Get|Groups|Home|Maps|Mobile|Moderator|My|Ngram|One|Opinion|Photos|Play|Plugin|Primer|Public|Questions|Schemer|Scholar|Search|Search‎|Shopping|Sites|Spaces|Store|Street|Surveys|Sync|Tez|Translate|Translator|URL|Videos|Wallet|Website|WiFi</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="Ampersands" name="AMPERSANDS">
      <pattern>
          <token regexp='yes'>C&amp;A|I&amp;D|S&amp;P</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="LOW_COST" name="Low cost">
      <pattern>
          <token>low</token>
          <token regexp="yes" spacebefore='no' min='0'>&hifen;</token>
          <token regexp="yes">costs?</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="T-SHIRT" name="T-shirts">
      <pattern>
          <token>t</token>
          <token regexp="yes" spacebefore='no'>&hifen;</token>
          <token regexp="yes" spacebefore='no'>shirts?</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id="STAND-UP_COMEDY" name="Stand-up comedy">
      <pattern>
          <token>stand</token>
          <token regexp="yes" spacebefore='no'>&hifen;</token>
          <token spacebefore='no'>up</token>
          <token regexp="yes">comed(y|ies)</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>

  <rulegroup id='LOOSE_UPPERCASES' name='Maiúsculas soltas'>
    <!-- Created by Tiago F. Santos, Portuguese rule, 2017-10-10  	-->
    <rule>
      <pattern>
          <token regexp='yes'>(categoria|escalão|grupo|turma|vitamina)s?</token>
          <token case_sensitive='yes' regexp='yes'>\p{Lu}</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule id='SIZES' name='Tamanhos de roupa'>
      <pattern>
          <token regexp='yes'>tamanhos?</token>
          <token case_sensitive='yes' regexp='yes'>X{0,2}[SLM]|GG?|PP?</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
  </rulegroup>

    <rule id='WORDS_WITH_NUMBERS' name='Palavras com números'>
    <!-- Created by Tiago F. Santos, Portuguese rule, 2017-10-10  	-->
    <!-- XXX TV dimensions|3D|networks|4Chan|G20|G7|hypothesis|intel CPUs|P2P|number of rooms|highways -->
      <pattern>
          <token case_sensitive='yes' regexp='yes'>[248]K|[2345][DG]|4Chan|G(20|7)|H[₁₂₃₄₅₆₇₈₉₀]|i[357]|P2P|T[1234560]|(?:A|EN|IC)\d{1,3}</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>

  <rulegroup id="SPELLING_IGNORE_RULE" name="Ignore spellings rule">
    <!-- Created by Tiago F. Santos, Portuguese rule, 2017-06-XX  	-->
    <rule>
      <pattern>
        <marker>
          <token postag_regexp="yes" postag=".+_"/>
        </marker>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag_regexp="yes" postag="I"/>
        </marker>
          <token regexp='yes'>[\!\?]</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token postag_regexp="yes" postag="I"/>
        </marker>
          <token postag_regexp="yes" postag="I"/>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule>
      <pattern>
        <marker>
          <token case_sensitive="yes" regexp="yes">\p{Lu}</token>
        </marker>
          <token spacebefore='no'>.</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule><!-- apostrophes -->
      <pattern>
        <marker>
          <token regexp="yes">[dn]</token>
          <token spacebefore='no' regexp="yes">['’‘]</token>
        </marker>
          <token spacebefore='no' regexp="yes">[^bcdfghjklmnpqrstvwxyz]\w+</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule><!-- separators -->
      <pattern>
          <token>-</token>
          <token>-</token>
          <token>-</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule>
      <pattern>
          <token regexp='yes'>\d+.[ºª][sˢ]?</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule><!-- loose letters used in some time formats -->
      <pattern>
          <token regexp='yes'>\d{1,2}h(\d{2}m)?(\d{2})?s?</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule> <!-- variable in formulas -->
      <pattern>
          <token regexp='yes'>\w|&alfabeto_grego;</token><!-- XXX here μ is ok. it can't be micro -->
          <token regexp='yes'>&operadores_matematicos;</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule><!-- variable in formulas -->
      <pattern>
          <token regexp='yes'>&operadores_matematicos;</token>
          <token regexp='yes'>\w|&alfabeto_grego;
            <exception>μ</exception></token><!-- XXX don't add μ - possible confusion with loose micro -->
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule><!-- variable in formulas -->
      <pattern>
          <token postag_regexp='yes' postag='Z.+'/>
        <marker>
          <token regexp='yes'>\w|&alfabeto_grego;
            <exception>μ</exception></token><!-- XXX don't add μ - possible confusion with loose micro -->
        </marker>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule><!-- ignore abbreviations -->
      <pattern>
        <marker>
          <token regexp='yes'>&abreviaturas;</token>
        </marker>
          <token spacebefore='no'>.</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule><!-- ignore abbreviations -->
      <pattern>
          <token>n</token>
          <token spacebefore='no'>.</token>
          <token spacebefore='no' regexp='yes'>[ºª]ˢ?</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule>
    <!-- Based on English disambiguation.xml -->
      <pattern case_sensitive="yes">
          <token regexp="yes">\/|[\.·\/]|[\d\., ]*\d+</token>
          <token regexp="yes">&unidades_de_medida;</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule>
      <pattern case_sensitive="yes">
          <token regexp="yes">\d[\d ]*[\.,]?\d*(&unidades_de_medida;)</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
  </rulegroup>
    <rule name="Ignore spelling of file names" id="IGNORE_SPELLING_OF_FILE_NAMES">
    <!-- Localized from English by Tiago F. Santos, 2018-09-15  -->
      <pattern>
          <token/>
          <token spacebefore="no">.</token>
          <token spacebefore="no" regexp="yes">&extensoes_de_ficheiros;</token><!-- For more extensions, refer to https://fileinfo.com -->
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule name="Ignore spelling of @user mentions" id="IGNORE_USER_MENTION">
      <pattern>
          <token regexp="yes">@.+</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
  <rulegroup name="Ignore spelling of #hashtags" id="IGNORE_HASHTAG">
    <rule>
      <pattern>
          <token spacebefore="yes">#</token>
          <token spacebefore="no"/>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
    <rule>
      <pattern>
          <token postag="SENT_START"/>
          <token>#</token>
          <token spacebefore="no"/>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
  </rulegroup>
    <rule name="Ignore spelling of domain names" id="IGNORE_DOMAIN_NAMES">
      <pattern case_sensitive="yes">
          <token regexp="yes">[A-Za-z0-9\-]+</token>
          <token spacebefore="no">.</token>
          <token spacebefore="no" regexp="yes">&dominios_internet;</token>
      </pattern>
      <disambig action="ignore_spelling"/>
    </rule>
</rules>
