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-PT] Removed "temp_off" from rule ID:VERBO_PRONOMINAL_DE_V3 #10912

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

marcoagpinto
Copy link
Member

@marcoagpinto marcoagpinto commented Oct 2, 2024

Heya,

I have just removed the "temp_off" after removing false positives a couple of days ago or so:
https://internal1.languagetool.org/regression-tests/via-http/2024-10-01/pt-PT/result_style_VERBO_PRONOMINAL_DE_V3%5B1%5D.html

Total results:
https://internal1.languagetool.org/regression-tests/via-http/2024-10-01/pt-PT_full/result_style_VERBO_PRONOMINAL_DE_V3%5B1%5D.html

This rule is a lot better than the previous one we had.

Summary by CodeRabbit

  • New Features

    • Introduced new language rules to enhance grammatical correctness and stylistic quality in Portuguese.
    • Added rules to simplify common redundancies and promote formal language usage.
    • Implemented rules to avoid informal expressions and encourage concise alternatives.
  • Improvements

    • Enhanced existing rules for better detection of specific linguistic structures.
    • Reorganized rule groups for improved clarity and usability.

Copy link
Contributor

coderabbitai bot commented Oct 2, 2024

Walkthrough

The changes in this pull request involve significant modifications to the style.xml file within the Portuguese language modules of LanguageTool. The updates include the addition of new rules and rule groups aimed at refining grammatical correctness and enhancing the stylistic quality of Portuguese text. Existing rules have been adjusted for better pattern recognition, and structural changes have been made to improve clarity and organization within the file.

Changes

Files Change Summary
languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/pt-PT/style.xml Added multiple new rules for improving language usage, including rules to avoid redundancies and promote formal language. Modified existing rules for better accuracy and clarity. Structural changes made for better organization and comments added for clarification.

Possibly related PRs

Suggested reviewers

  • p-goulart
  • susanaboatto

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between f470760 and 4f30171.

📒 Files selected for processing (1)
  • languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/pt-PT/style.xml (1 hunks)
🔇 Additional comments (1)
languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/pt-PT/style.xml (1)

Line range hint 5160-5201: Removal of "temp_off" attribute enhances the active rule set.

The rule VERBO_PRONOMINAL_DE_V3 has had its "temp_off" attribute removed, indicating that it's now ready for active use. This rule aims to simplify certain pronominal verbs by suggesting the removal of the preposition "de" in specific contexts. The change enhances the formal style checking capabilities of LanguageTool for Portuguese (Portugal).

Key points:

  1. The rule targets verbs like "apelidar", "chamar", "classificar", etc., when followed by "de".
  2. It suggests removing "de" for increased formality and conciseness.
  3. The rule includes extensive exceptions to prevent false positives.

The implementation looks solid, with careful consideration given to various edge cases through the use of exceptions. However, as this rule is now active, it's crucial to monitor its performance in real-world usage to ensure it doesn't produce unwanted suggestions in valid constructions.

To confirm the rule's effectiveness and catch any potential issues, we should run a verification script:

This will help identify any patterns in the codebase where the rule might be applied, allowing for a review of these instances to ensure the rule's suggestions are appropriate.

✅ Verification successful

VERBO_PRONOMINAL_DE_V3 Rule Successfully Activated

The VERBO_PRONOMINAL_DE_V3 rule is active in style.xml as the temp_off attribute has been removed. Automated searches found no instances of temp_off associated with this rule, confirming its activation and readiness for use.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for instances where the rule might apply and check for potential false positives
rg -i '\b(apelidar|chamar|classificar|cognominar|denominar|designar|intitular)\s+de\b' --type xml

Length of output: 99


Script:

#!/bin/bash
# Verify that the rule VERBO_PRONOMINAL_DE_V3 is active in style.xml
ast-grep --lang xml --pattern $'rule id="VERBO_PRONOMINAL_DE_V3" { $$$ }'

# Search for any instances where the rule might apply across all XML files
rg -i '\b(apelidar|chamar|classificar|cognominar|denominar|designar|intitular)\s+de\b' --type xml

# Additionally, search for the presence of "temp_off" to ensure it has been removed
rg -i 'temp_off' --type xml

Length of output: 37425


Script:

#!/bin/bash
# Verify the presence and active status of the VERBO_PRONOMINAL_DE_V3 rule in the specified style.xml
rg -A 5 '<rule id="VERBO_PRONOMINAL_DE_V3"[^>]*>' languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/pt-PT/style.xml

# Additionally, ensure that there are no instances of temp_off associated with this rule
rg -i 'VERBO_PRONOMINAL_DE_V3' languagetool-language-modules/pt/src/main/resources/org/languagetool/rules/pt/pt-PT/style.xml | rg 'temp_off'

Length of output: 284


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 marcoagpinto merged commit fb3f744 into master Oct 2, 2024
5 checks passed
@marcoagpinto marcoagpinto deleted the lt_marcoagpinto_20241002_2143 branch October 2, 2024 21:22
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