-
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:VERB_QUE_É_VERB_SER #11207
Conversation
WalkthroughThis pull request introduces a new antipattern in the Portuguese language module's style rules XML configuration. The antipattern defines a specific grammatical sequence involving determiners, the word "que", verb forms "é" or "são", and additional token conditions. The new rule targets a particular linguistic construction in Portuguese, with two example sentences demonstrating its application. Additionally, a new entry for the term "X" has been added to the part-of-speech dictionary, expanding the vocabulary recognized by the language module. Changes
Possibly related issues
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (2)
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 (2)
languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/style.xml (2)
15092-15093
: Examples should demonstrate edge cases.While the provided examples are valid, they only demonstrate the basic case. Consider adding examples that:
- Test the maximum skip distance (4 tokens)
- Show variations of preposition + article combinations
- Include both singular ("é") and plural ("são") cases with minimum tokens
15085-15094
: Consider adding XML comments for maintainability.The antipattern would benefit from a comment explaining:
- The grammatical construction it's trying to match
- Why this is an exception to the rule
- The meaning of each token's postag pattern
Add a comment block like this:
+ <!-- + Antipattern for constructions where "que é/são" is followed by an indefinite determiner + SPS00:DA = preposition + article + DP = demonstrative pronoun + DI = indefinite determiner + --> <antipattern>
📜 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 (1)
languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/style.xml (1)
15087-15091
: Verify the token sequence and skip value.The antipattern structure looks correct, but the
skip='4'
value on line 15088 might be too permissive and could lead to false positives. Consider if a smaller skip value would be sufficient.Let's analyze other similar patterns in the codebase:
Just an antipattern.
Summary by CodeRabbit