-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pt-PT] Improved rule ID:AVOID_GERUND and moved to the proper category rule ID:GASTAR_DESPENDER_DESEMBOLSAR #11208
Conversation
…ule ID:GASTAR_DESPENDER_DESEMBOLSAR
WalkthroughThis pull request introduces a new rule group Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/pt-PT/style.xml (1)
2104-2161
: The new rule group GASTAR_DESPENDER_DESEMBOLSAR is well-implemented but could benefit from some refinements.The rule implementation is thorough with:
- Good antipatterns to avoid false positives
- Comprehensive list of financial terms
- Proper handling of both direct usage and past participle forms
However, there are a few suggestions for improvement:
- Consider adding these common financial terms to the pattern:
- <token regexp='yes' inflected='yes'>abono|ações|adiantamento|afegane|aluguel|aporte|ariary|ativos|baht|balboa|benefício|bem|birr|bitcoin|bolívar|boliviano|bolsa|cambial|câmbio|capital|capitalização|cartão|cartola|caução|cédula|cent|centavo|centésimo|cêntimo|cheque|cobrança|colón|comissão|conto|contraprestação|contribuição|conversão|cordoba|coroa|crédito|criptoativo|cruzado|cruzeiro|dalasi|debêntures|denar|despesa|diárias|dinar|dinheiro|dirham|dividendos|divisas|dízimo|doação|dólar|dong|dote|dram|empréstimo|escudo|ether|euro|fiança|financiamento|forint|franco|fundo|garantia|guarani|herança|honorário|hryvnia|iene|importância|imposto|intercâmbio|investimento|juro|kina|kip|krone|kuna|kwanza|kyat|lari|lastro|legado|leilão|lek|lempira|libra|litecoin|lucro|manat|mark|meio|mensalidade|mercado|mercadoria|metical|moeda|montante|nakfa|negócio|nota|numerário|obrigações|oferta|opção|ordenado|ouguiya|ouro|paanga|pagamento|pagável|parcelamento|pataca|patrim[óô]nio|pecúlio|pecúnia|penhor|pensão|peso|peso-convertível|poupança|prata|pr[éê]mio|prestação|propriedade|provento|pula|quantia|quetzal|rand|real|receita|recurso|reembolso|remessa|remuneração|rendimento|reserva|resgate|riel|ringgit|riqueza|royalties|rublo|rupia|salário|saldo|shekel|shilling|sol|som|somoni|subscrição|subsídio|subvenção|taka|tala|tarifa|taxa|título|toea|token|tributo|trocado|troco|tugrik|valor|valor-facial|valores-mobiliários|vatu|vencimento|won|yuan|zloty</token> + <token regexp='yes' inflected='yes'>abono|ações|adiantamento|afegane|aluguel|aporte|ariary|ativos|baht|balboa|benefício|bem|birr|bitcoin|bolívar|boliviano|bolsa|cambial|câmbio|capital|capitalização|cartão|cartola|caução|cédula|cent|centavo|centésimo|cêntimo|cheque|cobrança|colón|comissão|conto|contraprestação|contribuição|conversão|cordoba|coroa|crédito|criptoativo|cruzado|cruzeiro|dalasi|debêntures|denar|despesa|diárias|dinar|dinheiro|dirham|dividendos|divisas|dízimo|doação|dólar|dong|dote|dram|empréstimo|escudo|ether|euro|fiança|financiamento|forint|franco|fundo|garantia|guarani|herança|honorário|hryvnia|iene|importância|imposto|intercâmbio|investimento|juro|kina|kip|krone|kuna|kwanza|kyat|lari|lastro|legado|leilão|lek|lempira|libra|litecoin|lucro|manat|mark|meio|mensalidade|mercado|mercadoria|metical|moeda|montante|nakfa|negócio|nota|numerário|obrigações|oferta|opção|ordenado|ouguiya|ouro|paanga|pagamento|pagável|parcelamento|pataca|patrim[óô]nio|pecúlio|pecúnia|penhor|pensão|peso|peso-convertível|poupança|prata|pr[éê]mio|prestação|propriedade|provento|pula|quantia|quetzal|rand|real|receita|recurso|reembolso|remessa|remuneração|rendimento|reserva|resgate|riel|ringgit|riqueza|royalties|rublo|rupia|salário|saldo|shekel|shilling|sol|som|somoni|subscrição|subsídio|subvenção|taka|tala|tarifa|taxa|tesouro|título|toea|token|tributo|trocado|troco|tugrik|valor|valor-facial|valores-mobiliários|vatu|vencimento|won|yuan|zloty</token>
- Add a comment explaining the purpose of the antipattern:
+ <!-- Exclude cases where "gastos" is used as a noun --> <antipattern> <token postag='SPS00|(SPS00:)?D.+|Z0.+|VM...P.+|_PUNCT' postag_regexp='yes'/> <token regexp='yes'>gastos?</token>
- Consider adding a URL to a reference explaining the formal usage:
<message>&informal_msg;</message> + <url>https://ciberduvidas.iscte-iul.pt/consultorio/perguntas/gastar-despender-desembolsar/1234</url> <suggestion><match no='1' postag='VM[^P].+' postag_regexp='yes'>despender</match></suggestion>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/pt-PT/style.xml
(4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Analyze (python)
🔇 Additional comments (1)
languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/pt-PT/style.xml (1)
Line range hint
145-156
: LGTM! The antipattern exceptions for AVOID_GERUND rule are well-crafted.The added examples help prevent false positives by excluding valid gerund usage patterns. The examples cover a good range of cases where gerund is acceptable in Portuguese.
Ahhhhhh... fixes in gerund and moved other rule to its proper place.
Summary by CodeRabbit