-
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] Removed "temp_off" from rules #11244
Conversation
WalkthroughThis change updates two language style rules in the Portuguese module by removing the 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 (6)
languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/pt-PT/style.xml (6)
67-68
: Improve entity definitions for gerund exceptionsThe entities
gerundio_excecoes_verbos_auxiliares
andgerundio_excecoes_verbos_nao_auxiliares
contain very long lists of words. Consider splitting these into multiple smaller, semantically-grouped entities for better maintainability.For example:
<!ENTITY gerundio_excecoes_movimento "abaixando|andando|correndo|deslizando|entrando|saindo|subindo|voltando"> <!ENTITY gerundio_excecoes_comunicacao "falando|gritando|resmungando|sussurrando"> <!ENTITY gerundio_excecoes_cognicao "aprendendo|entendendo|esquecendo|sabendo">
135-192
: Enhance gerund avoidance rule with additional contextThe
AVOID_GERUND
rule is well-structured but could benefit from additional context handling. The current antipatterns may miss some valid cases.Consider adding antipatterns for:
- Fixed expressions where gerund is standard
- Temporal clauses with gerund
- Adverbial uses of gerund
Example:
<antipattern> <!-- Fixed expressions --> <token regexp='yes'>água|tempo</token> <token>correndo</token> </antipattern>
2112-2166
: Improve handling of verb variations in GASTAR_DESPENDER_DESEMBOLSAR ruleThe rule for replacing "gastar" with "despender/desembolsar" is thorough but could be enhanced to handle more verb forms and contexts.
Add support for:
- Compound tenses
- Passive voice
- Reflexive forms
Example:
<antipattern> <token inflected='yes'>ter|haver</token> <token min='0' max='1'>que</token> <token inflected='yes'>gastar</token> </antipattern>
4401-4418
: Enhance simplification rule for passive voice constructionsThe rule
SIMPLIFICAR_A_SER_PP_A_INF
could be improved to handle more complex passive voice constructions.Add support for:
- Negations
- Modal verbs
- Complex verb chains
Example:
<antipattern> <token>não</token> <token inflected='yes'>poder|dever</token> <token>a</token> <token>ser</token> <token postag='VMP00S.+' postag_regexp='yes'/> </antipattern>
4803-4964
: Optimize pronoun replacement rules for better coverageThe
VERBO_PARA_PRONOME_PESSOAL_V2
rulegroup is comprehensive but could be optimized for better performance and coverage.
- Consolidate similar patterns using shared token definitions
- Add support for more verb forms
- Handle special cases with clitics
Example:
<!ENTITY pronomes_pessoais "mim|ti|si|ele|ela|nós|vós|eles|elas"> <pattern> <token postag='V.+' postag_regexp='yes'/> <token>para</token> <token regexp='yes'>&pronomes_pessoais;</token> </pattern>
4997-5010
: Enhance utility verb replacement ruleThe
VERBO_SER_ÚTIL_PARA_SERVIR_PARA
rule could be expanded to handle more variations of utility expressions.Add support for:
- Synonyms of "útil"
- Different verb tenses
- Negations
Example:
<pattern> <token inflected='yes'>ser</token> <token skip='1' regexp='yes'>út(il|eis)|proveitoso|vantajoso</token> <token>para</token> </pattern>
📜 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)
Removed "temp_off".
Summary by CodeRabbit
New Features
Refactor