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

[crh] rules update (cyrillization) #10906

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

AdamHider
Copy link
Contributor

@AdamHider AdamHider commented Sep 30, 2024

Cyrillized rules and rulegroups:
EXODIVE_VERB_ADVB_COLLOCATION
POSTPOSITION_CASE_COLLOCATION
TENSE_PARTICLE_CASE_COLLOCATION
REASON_PARTICLE_CASE_COLLOCATION
SIMPLE_INFINITIVE
QUESTION_PARTICLE_PERSONALIZED_MISSPOS
QUESTION_PARTICLE_SEPARATION
COMPLEX_NUMBER_DEFIS_MISSING
TOPONOMY_TYPOS
COLLOQUIAL_TYPOS
LASTING_ADVERB_AFFIX

Summary by CodeRabbit

  • New Features
    • Enhanced grammar checking for the Crimean Tatar language with new rules for colloquial typos, toponymy, and grammatical structures in both Latin and Cyrillic scripts.
    • Introduced specific rules for question particle placement and verb case collocation.
    • Improved suggestions for common colloquial errors and place name spellings.

Copy link

coderabbitai bot commented Sep 30, 2024

Walkthrough

The pull request introduces multiple new rule groups to enhance grammar checking for the Crimean Tatar language in both Latin and Cyrillic scripts. These include rules for colloquial typos, toponymy, adverb affixes, question particle placement, and verb case collocation. Additionally, minor updates to existing rules are made for improved clarity and accuracy.

Changes

Files Change Summary
languagetool-language-modules/crh/src/main/resources/.../grammar.xml Added new rule groups: COLLOQUIAL_TYPOS_CYR, TOPONOMY_TYPOS_CYR, LASTING_ADVERB_AFFIX_CYR, QUESTION_PARTICLE_SEPARATION_CYR, QUESTION_PARTICLE_PERSONALIZED_MISSPOS_CYR, VERB_CASE_COLLOCATION_CYR, SIMPLE_INFINITIVE_CYR, and PERCENTAGE_COORDINATION_CYR. Minor adjustments made to existing rules for clarity.

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

@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 (6)
languagetool-language-modules/crh/src/main/resources/org/languagetool/rules/crh/grammar.xml (6)

291-320: LGTM! Consider improving comment formatting.

The new LASTING_ADVERB_AFFIX_CYR rule group is a well-implemented Cyrillic version of the existing Latin script rule. The patterns, suggestions, and examples are correctly transliterated and appropriate.

Consider adding a blank line before and after the rule group for improved readability, consistent with the formatting of other rule groups in the file.


339-355: LGTM! Consider improving comment formatting.

The new COLLOQUIAL_TYPOS_CYR rule group is a well-implemented Cyrillic version of the existing Latin script rule. The patterns, suggestions, and examples are correctly transliterated and appropriate.

Consider adding a blank line before and after the rule group for improved readability, consistent with the formatting of other rule groups in the file.


366-374: LGTM! Consider improving comment formatting.

The new TOPONOMY_TYPOS_CYR rule group is a well-implemented Cyrillic version of the existing Latin script rule. The patterns, suggestions, and examples are correctly transliterated and appropriate.

Consider adding a blank line before and after the rule group for improved readability, consistent with the formatting of other rule groups in the file.


472-501: LGTM! Consider improving comment formatting.

The new COMPLEX_NUMBER_DEFIS_MISSING_CYR rule group is a well-implemented Cyrillic version of the existing Latin script rule. The patterns, suggestions, exceptions, and examples are correctly transliterated and appropriate. The new exceptions added to the Latin script version are also correctly included here.

Consider adding a blank line before and after the rule group for improved readability, consistent with the formatting of other rule groups in the file.


531-550: LGTM! Consider improving comment formatting.

The new QUESTION_PARTICLE_SEPARATION_CYR rule group is a well-implemented Cyrillic version of the existing Latin script rule. The patterns, suggestions, and examples are correctly transliterated and appropriate.

Consider adding a blank line before and after the rule group for improved readability, consistent with the formatting of other rule groups in the file.


570-587: LGTM! Consider improving comment formatting.

The new QUESTION_PARTICLE_PERSONALIZED_MISSPOS_CYR rule group is a well-implemented Cyrillic version of the existing Latin script rule. The patterns, suggestions, and examples are correctly transliterated and appropriate.

Consider adding a blank line before and after the rule group for improved readability, consistent with the formatting of other rule groups in the file.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 78126c5 and 4db239e.

📒 Files selected for processing (1)
  • languagetool-language-modules/crh/src/main/resources/org/languagetool/rules/crh/grammar.xml (12 hunks)
🔇 Additional comments (2)
languagetool-language-modules/crh/src/main/resources/org/languagetool/rules/crh/grammar.xml (2)

Line range hint 442-471: LGTM! Improved rule accuracy with new exceptions.

The modifications to the COMPLEX_NUMBER_DEFIS_MISSING rule group add valuable exceptions for specific cases (1C, numbers with apostrophes or 'k', and temperature notations). These changes improve the rule's accuracy and are consistently applied across both rules in the group.


Line range hint 1-1231: Overall, excellent additions to support Cyrillic script!

The changes in this file significantly enhance the grammar checking capabilities for Crimean Tatar by adding Cyrillic versions of existing Latin script rules. The new rule groups are well-implemented, consistent with the existing structure, and cover important aspects such as lasting adverb affixes, colloquial typos, toponymy, complex numbers, and question particle usage.

The modifications to existing rules, such as the COMPLEX_NUMBER_DEFIS_MISSING group, improve rule accuracy by adding relevant exceptions.

To further improve the file:

  1. Consider adding blank lines before and after each rule group for better readability.
  2. Ensure consistent indentation across all rule groups.
  3. Consider adding comments to explain the purpose of each rule group, especially for the newly added Cyrillic versions.

These changes will greatly benefit users of the Crimean Tatar language module in LanguageTool, providing more comprehensive grammar checking for both Latin and Cyrillic scripts.

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