languagetool-org / languagetool

Style and Grammar Checker for 25+ Languages
https://languagetool.org
GNU Lesser General Public License v2.1
12.48k stars 1.4k forks source link

[pt] Major improvement in verbs/nouns in disambiguation.xml rule ID:RARE_POS #10986

Closed marcoagpinto closed 3 weeks ago

marcoagpinto commented 3 weeks ago

These tiny changes are a major update in fixing verbs/nouns.

Summary by CodeRabbit

coderabbitai[bot] commented 3 weeks ago

Walkthrough

The pull request includes updates to the disambiguation.xml file for Portuguese language rules in LanguageTool. Key modifications involve changes to the RARE_POS rule, such as an increase in the verified results count from 22981 to 31048 and adjustments to the token matching patterns. The disambiguation actions remain consistent, and comments within the XML file are preserved to provide clarity on the rules' functionalities.

Changes

File Path Change Summary
languagetool-language-modules/pt/src/main/resources/org/languagetool/resource/pt/disambiguation.xml - Updated RARE_POS rule to reflect new results count (31048).
- Modified token matching patterns for RARE_POS.
- Maintained disambiguation actions and preserved comments.

Possibly related PRs

Suggested reviewers


πŸ“œ Recent review details **Configuration used: CodeRabbit UI** **Review profile: CHILL**
πŸ“₯ Commits Reviewing files that changed from the base of the PR and between 55a4dad339c719b01e0da2bc5eef2b4837eafae8 and 408009e52cc5fe497a9bd5a3387c6516428601fd.
πŸ“’ Files selected for processing (1) * `languagetool-language-modules/pt/src/main/resources/org/languagetool/resource/pt/disambiguation.xml` (1 hunks)
πŸ”‡ Additional comments (2)
languagetool-language-modules/pt/src/main/resources/org/languagetool/resource/pt/disambiguation.xml (2) `241-241`: **Documentation update reflects increased verification coverage.** The comment indicates a significant increase in verified results from 22981 to 31048 cases using ChatGPT 4, showing improved rule coverage. --- `247-247`: **Pattern expanded to handle additional verb forms.** The pattern has been enhanced to include: - VMIP3S0: Verb Main Indicative Present 3rd Person Singular - VMM02S0: Verb Main Imperative 2nd Person Singular This improves the rule's ability to disambiguate between verbs and nouns in more grammatical contexts.
βœ… Verification successful **Pattern expansion is correctly implemented and verified** The disambiguation.xml file shows that the expanded pattern `VMIP3S0|VMM02S0` is properly integrated into multiple disambiguation rules with corresponding test examples. The file contains: - Multiple rules using these verb forms in their patterns - Example cases demonstrating correct disambiguation: - "quebra" β†’ `[quebrar/VMIP3S0,quebrar/VMM02S0]` - "pode" β†’ `[poder/VMIP3S0,poder/VMM02S0]` - "precisa" β†’ `[precisar/VMIP3S0,precisar/VMM02S0]`
🏁 Scripts executed The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Verify the impact of the added verb forms # Look for examples of the new patterns in the test files # Search for test cases using the new verb forms rg -A 2 'VMIP3S0|VMM02S0' 'languagetool-language-modules/pt/src/test/' ``` Length of output: 70 --- Script: ```shell #!/bin/bash # Let's check for any test files that might contain these patterns in a different format # or look for related disambiguation rules # Search for test files in the Portuguese module fd . 'languagetool-language-modules/pt/src/test/' -e xml # Also check the disambiguation.xml file itself to understand the context better cat 'languagetool-language-modules/pt/src/main/resources/org/languagetool/resource/pt/disambiguation.xml' | grep -A 5 -B 5 'VMIP3S0\|VMM02S0' ``` Length of output: 3946

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 - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
πŸͺ§ Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , 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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
marcoagpinto commented 3 weeks ago

@jaumeortola

It didn't break the Premium!!!!!!!

❀️

marcoagpinto commented 3 weeks ago

@jaumeortola

Why are there so many changes in the night diffs?

Yesterday, I only replaced β€œSPS00:DAFS blah blah” with β€œΓ β€ in the disambiguator.

It makes no sense all the results change overnight.

susanaboatto commented 3 weeks ago

Did you push anything later in the afternoon the day before yesterday? Changes could pertain to that, too. I'm trying to track where they are coming from but they seem quite random so far, so it could have something to do with the disambiguator.

marcoagpinto commented 3 weeks ago

@susanaboatto

Before yesterday, I merged the "SPS00:DA0FS0" in the verbs/nouns fix in the disambiguator.

And yesterday I replaced the postag with "Γ " since it was the same thing.

I can't remember any more changes done except the two words from yesterday (spelling.txt).

jaumeortola commented 3 weeks ago

@susanaboatto I think that the random changes come from configuration issues in the server. It hasn't been stable for some days now.