-
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] Added AP to rule ID:WORDINESS #11148
Conversation
WalkthroughThe pull request modifies the Portuguese language module's style rules XML configuration. A new antipattern is introduced for the verb "fazer" (to do/make) when used with tokens "um"/"uns" (a/some) and "planos" (plans). The changes expand the grammatical conditions for detecting this language pattern, adding multiple example scenarios to illustrate the rule's application. The existing pattern is also modified to allow more flexible matching of tokens, and a new example correction is provided. 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/style.xml (1)
1557-1569
: LGTM! Well-structured antipattern with comprehensive examples.The antipattern effectively captures valid use cases where "fazer um plano" should not be flagged, such as specific types of plans (attack, study, action). The token structure is well-designed with:
- Proper handling of inflections
- Support for both singular and plural forms
- Flexible matching of prepositions
- Comprehensive postag pattern for the final token
Consider adding XML comments to explain the postag pattern
N.+|AQ.+|VMP00.+
for better maintainability, as these patterns can be complex to understand at a glance.
📜 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/style.xml
(1 hunks)
🔇 Additional comments (2)
languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/style.xml (2)
1572-1572
: LGTM! Pattern modification aligns with antipattern structure.
The regular expression u(m|ns)
correctly matches both singular ("um") and plural ("uns") forms, maintaining consistency with the antipattern definition.
1578-1578
: LGTM! Example demonstrates plural form handling.
The added example effectively shows how the rule handles the plural form "fazer uns planos" and its correction to "planear", complementing the existing singular form example.
Antipattern + minor enhancements.
Summary by CodeRabbit