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

[de] add words + gGEC AP + removed currencies #10961

Merged
merged 3 commits into from
Oct 22, 2024

Conversation

Luisa-LT
Copy link
Collaborator

@Luisa-LT Luisa-LT commented Oct 22, 2024

Summary by CodeRabbit

Release Notes

  • New Features

    • Added new entries to the ignore list for improved spell-checking accuracy.
    • Enhanced multitoken suggestions with new terms for better language support.
    • Introduced a new rule for detecting and correcting monetary formats.
  • Bug Fixes

    • Updated spelling rules to reflect correct German orthography and recent spelling reforms.
    • Corrected names and terms to align with proper spelling conventions.

These updates aim to enhance the overall performance and accuracy of the German language module in LanguageTool.

Copy link
Contributor

coderabbitai bot commented Oct 22, 2024

Walkthrough

This pull request introduces multiple updates across various files in the German language module of LanguageTool. Key changes include the addition of new terms to the ignore.txt and multitoken-suggest.txt files, updates to spelling and punctuation rules in grammar.xml, and the introduction of a new monetary value detection rule in remote-rule-filters.xml. Additionally, the replace.txt file has been updated to correct names and terms in accordance with the latest German spelling reforms.

Changes

File Change Summary
.../de/src/main/resources/org/languagetool/resource/de/hunspell/ignore.txt Added entries: Luchenko/S, Lugeder/S, Lumentus, Luschin/S; repeated entry for XPOSED.
.../de/src/main/resources/org/languagetool/resource/de/multitoken-suggest.txt Added entries: Artocarpus heterophyllus, Hua Luogeng/S; removed previous entry for Artocarpus heterophyllus.
.../de/src/main/resources/org/languagetool/rules/de/de-DE-AT/grammar.xml Updated rules: WEIST_DU_DE_SPELLING_RULE, GRUESSE_SPELLING_RULE, WEISS_SPELLING_RULE, WAEHRUNGSANGABEN_KOMMA.
.../de/src/main/resources/org/languagetool/rules/de/remote-rule-filters.xml Added new rule: AI_DE_GGEC_REPLACEMENT_OTHER for detecting monetary values.
.../de/src/main/resources/org/languagetool/rules/de/replace.txt Added and updated entries for names and terms to align with German spelling reforms, including corrections for "Nicholas Cage" to "Nicolas Cage".

Possibly related PRs

Suggested reviewers

  • p-goulart
  • SteVio89
  • susanaboatto

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🧹 Outside diff range and nitpick comments (2)
languagetool-language-modules/de/src/main/resources/org/languagetool/rules/de/de-DE-AT/grammar.xml (1)

690-690: Excellent enhancement of currency detection!

The expansion of the currency regex pattern significantly improves the rule's coverage. This change will help catch more cases of incorrect currency formatting, enhancing the overall effectiveness of the grammar checker for German texts.

Consider adding a comment explaining the extensive list of currencies. This would help future maintainers understand the purpose and scope of this comprehensive regex.

languagetool-language-modules/de/src/main/resources/org/languagetool/rules/de/remote-rule-filters.xml (1)

2354-2364: New rule for monetary value detection looks good, but could be enhanced.

The new rule for detecting monetary values, particularly for Swiss Francs and Japanese Yen, is a good addition. However, consider the following enhancements:

  1. Add a <suggestion> tag to specify the correct format if there's a standard way these amounts should be written.
  2. Consider expanding the rule to cover other currencies if appropriate.
  3. Add a comment explaining the purpose of the rule for future maintenance.

Here's a suggested enhancement:

<!-- Rule for standardizing monetary values for CHF and JPY -->
<rule>
    <pattern>
        <marker>
            <token regexp="yes">[0-9]+\.[0-9]{2}|–</token>
        </marker>
        <token regexp="yes">CHF|s?Fr\.?|Franken?|Schweizerfranken?|Schwiizerfranken?|Rappen?|Rp\.?|JPY|Yen|¥</token>
    </pattern>
    <suggestion><match no="1"/> <match no="2"/></suggestion>
    <example>Es kostet <marker>11.90</marker> Franken pro Jahr.</example>
    <example correction="11.90 CHF">Es kostet <marker>11.90</marker> Franken pro Jahr.</example>
</rule>

This enhancement includes a suggestion (which keeps the original format but ensures consistency), an additional example with a correction, and a comment explaining the rule's purpose.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 0743bab and 3065f68.

📒 Files selected for processing (5)
  • languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/hunspell/ignore.txt (1 hunks)
  • languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/multitoken-suggest.txt (1 hunks)
  • languagetool-language-modules/de/src/main/resources/org/languagetool/rules/de/de-DE-AT/grammar.xml (1 hunks)
  • languagetool-language-modules/de/src/main/resources/org/languagetool/rules/de/remote-rule-filters.xml (1 hunks)
  • languagetool-language-modules/de/src/main/resources/org/languagetool/rules/de/replace.txt (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/hunspell/ignore.txt
🧰 Additional context used
🔇 Additional comments (9)
languagetool-language-modules/de/src/main/resources/org/languagetool/rules/de/replace.txt (6)

814-814: Correct separation and capitalization.

The change from "Fettarmekost" to "fettarme Kost" is appropriate. It correctly separates the compound word and adjusts the capitalization, improving readability and adhering to proper German spelling rules.


815-815: Correct separation and capitalization.

The change from "Gutelaune" to "gute Laune" is appropriate. It correctly separates the compound word and adjusts the capitalization, improving readability and adhering to proper German spelling rules.


816-816: Correct addition of umlaut.

The change from "Lugenbrief" to "Lügenbrief" is correct. It adds the necessary umlaut, aligning the word with proper German spelling.


817-817: Correct addition of umlaut in plural form.

The change from "Lugenbriefe" to "Lügenbriefe" is correct. It adds the necessary umlaut to the plural form, maintaining consistency with the singular form and aligning with proper German spelling.


818-818: Correct addition of umlaut in genitive form.

The change from "Lugenbriefs" to "Lügenbriefs" is correct. It adds the necessary umlaut to the genitive form, maintaining consistency with other forms and aligning with proper German spelling.


Line range hint 819-820: Correct addition of umlaut in various forms.

The changes from "Lugenbriefes" to "Lügenbriefes" and "Lugenbriefen" to "Lügenbriefen" are correct. They add the necessary umlaut to different forms of the word, maintaining consistency across all variations and aligning with proper German spelling.

languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/multitoken-suggest.txt (3)

3115-3115: LGTM: New entry "Artocarpus heterophyllus" added correctly.

The addition of "Artocarpus heterophyllus" is consistent with existing scientific name entries in the file. It's properly formatted without any suffix, which is appropriate for scientific names.


3116-3116: LGTM: New entry "Hua Luogeng/S" added correctly.

The addition of "Hua Luogeng/S" is consistent with existing person name entries in the file. The "/S" suffix is correctly applied, likely indicating the plural form.


3115-3116: Summary: Beneficial additions to the multitoken suggestions.

The two new entries, "Artocarpus heterophyllus" and "Hua Luogeng/S", are valuable additions to the German language module's multitoken suggestions. They expand the resource's coverage of scientific terms and notable figures, which can improve the language tool's ability to handle diverse text content.

@Luisa-LT Luisa-LT merged commit 1d0169e into languagetool-org:master Oct 22, 2024
2 checks passed
@Luisa-LT Luisa-LT deleted the improvements branch October 22, 2024 08:37
@coderabbitai coderabbitai bot mentioned this pull request Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant