-
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:GENERAL_VERB_AGREEMENT_ERRORS #11146
Conversation
WalkthroughThe pull request introduces a new rule group titled "Concordância Verbal: Geral" (General Verb Agreement) in the Portuguese language module's 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/grammar.xml (1)
9119-9127
: Consider adding examples with different verb tensesWhile the current examples are good, consider adding cases with:
- Present perfect (pretérito perfeito composto)
- Future tense
- Conditional mood
📜 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/grammar.xml
(1 hunks)
🔇 Additional comments (4)
languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/grammar.xml (4)
9110-9112
: LGTM: Rule group declaration follows conventions
The rule group is properly declared with a descriptive ID and appropriate name in Portuguese.
9113-9118
: LGTM: Well-structured token pattern for coordinated subjects
The antipattern correctly handles the Portuguese grammar rule for coordinated subjects with "nem...nem" construction, using appropriate part-of-speech tags and regular expressions.
9128-9129
: LGTM: Clear handling of mesoclisis cases
The antipattern correctly handles mesoclisis with appropriate spacing rules and helpful documentation.
9110-9129
: Verify similar patterns in other Romance language modules
Let's check if similar verb agreement patterns exist in other Romance language modules for consistency.
✅ Verification successful
Let me generate another verification script to check for verb agreement patterns in Romance language modules more effectively.
Let me try one more verification script to check the specific patterns in other Romance language modules more effectively.
Based on the verification results, I can now provide the final response:
Similar verb agreement patterns exist in Romance languages with some variations
The verification shows that verb agreement patterns are handled differently across Romance languages:
- Spanish has subject-verb agreement rules under
AGREEMENT_SUBJECT_VERB
categories - French has verb agreement rules like
ACCORD_VERBE_PPA
for past participle agreement - The
nem...nem
(neither...nor) pattern in Portuguese appears to be properly handled with antipatterns to avoid false positives
The current implementation in Portuguese aligns well with other Romance language modules, each adapting the rules to their specific grammar requirements while maintaining consistency in the overall approach to verb agreement checking.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for similar verb agreement patterns in other Romance language modules
echo "Searching for similar patterns in other Romance language modules..."
fd . "languagetool-language-modules/(es|fr|it|ca|gl)/src/main/resources" -t f -e xml | xargs rg -l "VERB_AGREEMENT"
# Check for specific nem...nem patterns in Portuguese
echo "Checking for other nem...nem patterns in Portuguese rules..."
rg -A 2 "nem.*nem" "languagetool-language-modules/pt/src/main/resources"
Length of output: 31666
Script:
#!/bin/bash
# Search for verb agreement patterns in Romance language modules
echo "Searching in Spanish grammar rules..."
rg -A 2 "concordancia.*verbo|verbo.*concordancia" "languagetool-language-modules/es/src/main/resources" || true
echo -e "\nSearching in French grammar rules..."
rg -A 2 "accord.*verbe|verbe.*accord" "languagetool-language-modules/fr/src/main/resources" || true
echo -e "\nSearching in Italian grammar rules..."
rg -A 2 "concordanza.*verbo|verbo.*concordanza" "languagetool-language-modules/it/src/main/resources" || true
echo -e "\nSearching in Galician grammar rules..."
rg -A 2 "concordancia.*verbo|verbo.*concordancia" "languagetool-language-modules/gl/src/main/resources" || true
echo -e "\nSearching for verb agreement rule IDs in Romance languages..."
fd . "languagetool-language-modules/(es|fr|it|gl)/src/main/resources" -t f -e xml | xargs rg "id=.*VERB.*AGREEMENT|id=.*CONCORDANCIA.*VERB"
Length of output: 87164
Script:
#!/bin/bash
# Search for verb agreement patterns in Romance languages with correct paths
echo "Searching in Spanish grammar rules..."
rg -A 2 "VERB_AGREEMENT|CONCORDANCIA_VERBO" "languagetool-language-modules/es/src/main/resources/org/languagetool/rules/es/grammar.xml" || true
echo -e "\nSearching in French grammar rules..."
rg -A 2 "ACCORD_VERBE|VERBE_ACCORD" "languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml" || true
echo -e "\nSearching in Italian grammar rules..."
rg -A 2 "CONCORDANZA_VERBO|VERBO_CONCORDANZA" "languagetool-language-modules/it/src/main/resources/org/languagetool/rules/it/grammar.xml" || true
echo -e "\nSearching in Galician grammar rules..."
rg -A 2 "CONCORDANCIA_VERBO|VERBO_CONCORDANCIA" "languagetool-language-modules/gl/src/main/resources/org/languagetool/rules/gl/grammar.xml" || true
# Also check for nem...nem patterns in Portuguese
echo -e "\nChecking for nem...nem patterns in Portuguese grammar..."
rg -A 2 "nem.*nem" "languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/grammar.xml"
Length of output: 2121
Added an antipattern.
Summary by CodeRabbit