Skip to content
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] Disambiguator fixes verb/noun: had to remove two rules #10979

Merged
merged 4 commits into from
Nov 3, 2024

Conversation

marcoagpinto
Copy link
Member

@marcoagpinto marcoagpinto commented Nov 3, 2024

Heya, @jaumeortola ,

I had to remove two rules which incorrectly used substantives as verbs.

Screenshot 2024-11-03 at 04-48-02 ChatGPT

Summary by CodeRabbit

  • New Features

    • Introduced new grammar rules for improved accuracy in Portuguese, including distinctions between informal and formal language.
    • Added rules to avoid gerund forms and simplify expressions.
    • Enhanced disambiguation rules for rare parts of speech.
  • Bug Fixes

    • Removed outdated rulegroup addressing incorrect usage of prepositions with pronouns, enhancing clarity in grammar checks.
    • Removed specific rule related to possessive pronouns to refine suggestions.
  • Documentation

    • Updated examples and definitions within rules for better user guidance on formal language standards.

Copy link
Contributor

coderabbitai bot commented Nov 3, 2024

Walkthrough

The pull request introduces extensive modifications to the style.xml and disambiguation.xml files for Portuguese language rules in LanguageTool. Key changes include the addition, modification, and removal of various grammar rules aimed at improving the accuracy and clarity of Portuguese grammar checks. New rules address specific language usage issues, while existing rules have been refined for clarity and relevance. Additionally, a rule group related to specific prepositional usages has been removed, indicating a shift in focus towards contemporary language standards.

Changes

File Path Change Summary
languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/style.xml - Added multiple new rules addressing various language usage issues.
- Removed the rule group À_MINHA-TUA-SUA-VOSSA_VERB and its associated rules.
- Updated existing rules with clearer definitions and examples.
- Commented out an example in the DENOMINADA rule.
languagetool-language-modules/pt/src/main/resources/org/languagetool/resource/pt/disambiguation.xml - Added a new rule in the RARE_POS rule group for disambiguating specific postags.
- Updated an existing rule in the RARE_POS group to expand its exception handling.
languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/pt-BR/style.xml - Removed the rule RETO_POSSESSIVO_PT related to possessive pronouns.

Possibly related issues

Possibly related PRs

Suggested reviewers

  • p-goulart
  • susanaboatto
  • jaumeortola

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between fde6e89 and 2839aed.

📒 Files selected for processing (2)
  • languagetool-language-modules/pt/src/main/resources/org/languagetool/resource/pt/disambiguation.xml (1 hunks)
  • languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/pt-BR/style.xml (0 hunks)
💤 Files with no reviewable changes (1)
  • languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/pt-BR/style.xml
🔇 Additional comments (2)
languagetool-language-modules/pt/src/main/resources/org/languagetool/resource/pt/disambiguation.xml (2)

243-243: Document the rationale for pattern modifications and verification methodology.

The modification adds exceptions to prevent false positives, but several aspects need attention:

  1. The large number of results (22981) verified using ChatGPT 4 raises concerns about:

    • The reliability and thoroughness of the verification process
    • The need for automated test cases to ensure continued accuracy
  2. The added exceptions would benefit from:

    • Documentation explaining why each part of speech was excluded
    • Examples of false positives that these exceptions prevent

Let's analyze the impact of these exceptions:


228-240: Consider improving documentation and verification methodology.

While the rule appears to correctly handle verb/noun disambiguation, there are several areas for improvement:

  1. The comment mentions using ChatGPT 4 for verification but doesn't document:

    • The specific test cases or scenarios verified
    • The accuracy rate or confidence level
    • The methodology used for verification
  2. The pattern structure is complex and could benefit from:

    • Inline documentation explaining the postag combinations
    • Examples of words/phrases that this rule targets
    • Test cases demonstrating correct disambiguation

Let's verify the impact of this rule:


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@marcoagpinto
Copy link
Member Author

@jaumeortola @danielnaber

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0:test (default-test) on project language-pt:

Is it safe to merge?

@marcoagpinto
Copy link
Member Author

Ahhhh... it is fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant