languagetool
languagetool copied to clipboard
[pt] Rule idea: “dar exemplo” → “exemplificar” — 2024-01-07
Hello @ricardojosehlima
I was so eager at it that I created another rule.
My concern is if it should work with plural:
<token regexp='yes'>um|uns|algum|alguns</token>
or only singular:
<token regexp='yes'>um|algum</token>
If it works with plural, then all results are valid, I believe:
Portuguese (Portugal): 24 total matches
Portuguese (Portugal): 811131 total sentences considered
Portuguese (Portugal): ø0.00 rule matches per sentence
<rulegroup id='DAR_EXEMPLO_EXEMPLIFICAR' name="Simplificar: 'Dar exemplo' → exemplificar" default="temp_off">
<!-- IDEA shorten_it -->
<!-- #1 - Without d[ao]s? -->
<rule>
<pattern>
<marker>
<token inflected='yes'>dar</token>
<token regexp='yes'>um|uns|algum|alguns</token>
<token regexp='yes'>exemplos?</token>
</marker>
<token postag='_PUNCT|SPS00|CC|CS' postag_regexp='yes'/>
</pattern>
<message>&simplify_msg;</message>
<suggestion><match no='1' postag='V.+' postag_regexp='yes'>exemplificar</match></suggestion>
<example correction="exemplificou">A Ana <marker>deu um exemplo</marker>.</example>
</rule>
<!-- #2 - With d[ao]s? -->
<rule>
<pattern>
<marker>
<token inflected='yes'>dar</token>
<token regexp='yes'>um|uns|algum|alguns</token>
<token regexp='yes'>exemplos?</token>
<token regexp='yes'>d[ao]s?</token>
</marker>
</pattern>
<message>&simplify_msg;</message>
<suggestion><match no='1' postag='V.+' postag_regexp='yes'>exemplificar</match> <match no='4' postag='SPS00:DA0(..)0' postag_replace='DA0$10'>o</match></suggestion>
<example correction="exemplificou a">A Ana <marker>deu um exemplo da</marker> equação.</example>
<example correction="exemplificou o">O Rui <marker>deu um exemplo do</marker> problema.</example>
</rule>
</rulegroup>
Thanks!
😛 😛 😛 😛 😛 😛
Looks cool! But for pt-br it serves for formal, academic and so on
Thank you, my dear Brother Ricardo!
❤️ ❤️ ❤️ ❤️ ❤️