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

[fr] Dictionary additions #10922

Merged
merged 1 commit into from
Oct 11, 2024
Merged

[fr] Dictionary additions #10922

merged 1 commit into from
Oct 11, 2024

Conversation

LucieSteib
Copy link
Collaborator

@LucieSteib LucieSteib commented Oct 10, 2024

In the context of https://app.asana.com/0/1205948788428908/1208474717235976/f

Summary by CodeRabbit

  • New Features

    • Enhanced French language dictionary with new proper nouns, adjectives, and nouns for improved spell-checking and grammar-checking functionalities.
    • Expanded multiword expressions to reflect contemporary usage, including names of individuals, organizations, and relevant terms.
  • Bug Fixes

    • Updated existing entries for consistency and accuracy in the dictionary and multiword expressions.

Copy link
Contributor

coderabbitai bot commented Oct 10, 2024

Walkthrough

The pull request introduces significant modifications to the French language module of LanguageTool, specifically updating the added.txt and multiwords.txt files. New entries, including proper nouns, adjectives, and common phrases, have been added to enhance the part-of-speech dictionary and multiword expression capabilities. Additionally, existing entries have been updated for accuracy and consistency, thereby improving the linguistic resources for spell-checking and grammar-checking functionalities.

Changes

File Path Change Summary
languagetool-language-modules/fr/src/main/resources/org/languagetool/resource/fr/added.txt Added multiple new entries for proper nouns, adjectives, and nouns; updated one existing entry for "bilié".
languagetool-language-modules/fr/src/main/resources/org/languagetool/resource/fr/multiwords.txt Added numerous new multiword expressions, including proper nouns and phrases; ensured formatting consistency.

Possibly related PRs

  • [fr] Adding words #10866: Adds new entries to the added.txt file for the French language module, directly related to the changes in the main PR.
  • [fr] Dictionary additions #10876: Introduces new entries to the added.txt file, expanding the vocabulary in the French language module, similar to the main PR.
  • [fr] Dictionary additions #10916: Adds several new entries to the added.txt file, including variations of "bilié," aligning with updates in the main PR.

Suggested reviewers

  • GillouLT: Suggested reviewer for the changes made in the French language module.

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/fr/src/main/resources/org/languagetool/resource/fr/multiwords.txt (2)

Line range hint 1-4822: Overall, the new entries maintain consistency with the existing format.

The new entries follow the established pattern of "expression;tag" and seem to be consistent in their structure. The majority of the new entries are proper nouns (tagged with Z), which is appropriate for names of people, places, and organizations.

However, there are a few points to note:

  1. Some entries use lowercase letters for proper nouns, which might be inconsistent with French capitalization rules.

  2. There are a few entries with unusual tags that might need verification:

    • "pro forma;J e sp" (line 4453): The tag 'J' is typically used for adjectives, but "pro forma" can also function as an adverb.
    • "boss des bécosses;N e s" (line 4456): This colloquial expression might benefit from additional tags or notes.
  3. Some entries might benefit from additional or more specific tags:

    • "casus belli;N m s" (line 4601): Consider adding the tag 'L' for Latin expressions.

Consider reviewing these specific entries and adjusting tags where appropriate to enhance the accuracy and usefulness of the multiword list.


Line range hint 1-4822: Consider adding a comment to explain the meaning of tags used.

While the file structure is consistent, it would be helpful for maintainers and contributors to have a brief explanation of the tags used in the file. This could be added as a comment at the beginning of the file.

Consider adding a comment block at the beginning of the file explaining the meaning of the tags used. For example:

# Tag explanations:
# Z: Proper noun
# N: Common noun
# J: Adjective
# A: Adverb
# V: Verb
# P: Preposition
# C: Conjunction
# I: Interjection
# T: Title
# D: Determiner
# m: Masculine
# f: Feminine
# s: Singular
# p: Plural
# e: Invariable (épicène)
# sp: Singular and plural

This will make the file more self-documenting and easier for others to understand and maintain.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between f2cbbf7 and bd0fe78.

📒 Files selected for processing (3)
  • languagetool-language-modules/fr/src/main/resources/org/languagetool/resource/fr/added.txt (1 hunks)
  • languagetool-language-modules/fr/src/main/resources/org/languagetool/resource/fr/hunspell/spelling.txt (1 hunks)
  • languagetool-language-modules/fr/src/main/resources/org/languagetool/resource/fr/multiwords.txt (1 hunks)
🔥 Files not summarized due to errors (1)
  • languagetool-language-modules/fr/src/main/resources/org/languagetool/resource/fr/hunspell/spelling.txt: Error: Server error: no LLM provider could handle the message
🧰 Additional context used
🔇 Additional comments (15)
languagetool-language-modules/fr/src/main/resources/org/languagetool/resource/fr/added.txt (12)

364-364: LGTM: Correct addition of feminine plural form

The addition of "biliées" as the feminine plural form of "bilié" is correct and consistent with French adjective inflection rules. The part-of-speech tag (J f p) is appropriate for a feminine plural adjective.


365-365: LGTM: Proper addition of a new proper noun

The entry for "Dindenault" is correctly formatted and tagged as a masculine singular proper noun (Z m s). This addition enhances the dictionary's coverage of proper names.


366-366: LGTM: Correct addition of mythological name

The entry for "Phrixos" is properly formatted and tagged as a masculine singular proper noun (Z m s). This addition enhances the dictionary's coverage of mythological names.


367-367: LGTM: Proper addition of mythological name

The entry for "Hellé" is correctly formatted and tagged as a feminine singular proper noun (Z f s). This addition complements the previous entry of Phrixos and enhances the dictionary's coverage of mythological names.


368-368: LGTM: Correct addition of proper noun

The entry for "Artaban" is properly formatted and tagged as a masculine singular proper noun (Z m s). This addition further expands the dictionary's coverage of proper names.


369-369: LGTM: Proper addition of proper noun

The entry for "Calprenède" is correctly formatted and tagged as a masculine singular proper noun (Z m s). This addition further enhances the dictionary's coverage of proper names, likely a surname or place name.


370-371: LGTM: Correct addition of dual-function word

The entries for "mésostiche" are properly formatted and tagged as both a masculine singular noun (N m s) and a masculine singular adjective (J m s). This dual entry correctly captures the word's ability to function as both a noun and an adjective in French, enhancing the dictionary's accuracy for this literary term.


372-373: LGTM: Proper addition of gender-neutral adjective

The entries for "yogique" (singular) and "yogiques" (plural) are correctly formatted and tagged as gender-neutral adjectives (J e s and J e p, respectively). The use of 'e' (épicène) for gender correctly indicates that this adjective has the same form for both masculine and feminine. This addition enhances the dictionary's coverage of yoga-related terminology.


374-374: LGTM: Correct addition of proper noun

The entry for "Héraclée" is properly formatted and tagged as a feminine singular proper noun (Z f s). This addition enhances the dictionary's coverage of historical place names, likely referring to ancient Greek cities named Heraclea.


376-376: LGTM: Proper addition of place name

The entry for "Pausilippe" is correctly formatted and tagged as a masculine singular proper noun (Z m s). This addition enhances the dictionary's coverage of place names, likely referring to Posillipo, a residential quarter of Naples, Italy.


364-376: Summary: Comprehensive and valuable additions to the French dictionary

This update to the French dictionary includes a diverse range of new entries, covering proper nouns (mythological, historical, and geographical), specialized terms, and adjectives. The additions and modifications consistently follow the required format and significantly enhance the dictionary's coverage.

Key points:

  1. Proper nouns: Dindenault, Phrixos, Hellé, Artaban, Calprenède, Héraclée, Asculum, and Pausilippe
  2. Specialized terms: mésostiche (both as noun and adjective)
  3. Adjectives: yogique (with correct gender-neutral tagging)
  4. Modification: Extended forms for "bilié"

These changes will improve LanguageTool's ability to recognize and process a wider range of French terms, particularly in literary and historical contexts.

Note: The gender assignment for "Asculum" (feminine) has been flagged for verification, as it may potentially be incorrect.

Overall, this is a valuable update that enhances the French language module's capabilities.


375-375: Verify gender for "Asculum"

The entry for "Asculum" is properly formatted and tagged as a proper noun (Z). However, while the addition of this ancient Roman city name enhances the dictionary, the feminine gender (f) assigned to it may be incorrect. In Latin, city names are typically neuter. Consider verifying if "Asculum" should be tagged as neuter or if there's a specific reason for it to be feminine in French usage.

To verify the gender of "Asculum" in French usage, you can run the following script:

languagetool-language-modules/fr/src/main/resources/org/languagetool/resource/fr/multiwords.txt (1)

4816-4822: ⚠️ Potential issue

The last few entries seem to be inconsistently formatted.

The entries from line 4816 to 4822 have an unusual format, with a line number followed by a tilde (~) before the actual entry. This is inconsistent with the rest of the file and may cause issues when processing the data.

Remove the line numbers and tildes from these entries to maintain consistency with the rest of the file. For example:

-Matthieu Godbout;Z m s
+Matthieu Godbout;Z m s
-Jacques-Perry Salkow;Z m s
+Jacques-Perry Salkow;Z m s
-Francis Pacherie;Z m s
+Francis Pacherie;Z m s
-Louise de Vilmorin;Z f s
+Louise de Vilmorin;Z f s
-Jacques-Perry Salkow;Z m s
+Jacques-Perry Salkow;Z m s
-Frédéric Schmitter;Z m s
+Frédéric Schmitter;Z m s
-Gautier de Costes de La Calprenède;Z m s
+Gautier de Costes de La Calprenède;Z m s

Also, note that "Jacques-Perry Salkow" is duplicated on lines 4817 and 4820. You may want to remove one of these duplicate entries.

Likely invalid or redundant comment.

languagetool-language-modules/fr/src/main/resources/org/languagetool/resource/fr/hunspell/spelling.txt (2)

34712-34722: Approved: Valuable additions to the French spelling dictionary

The new entries enhance the French language module by including a diverse range of words:

  1. Proper nouns (e.g., Marculfe, Dindenault, Phrixos)
  2. Place names (e.g., Héraclée, Asculum)
  3. Adjectives (e.g., yogique)
  4. Specialized terms (e.g., mésostiche)
  5. Potential acronyms (e.g., ANSM)

These additions will improve LanguageTool's ability to recognize and validate a wider variety of French words, including names and specialized vocabulary. The inclusion of accented characters (e.g., in Héraclée, Hellé) is correct and important for French language support.


34712-34722: Summary: Positive enhancement to the French spelling dictionary

These additions to the spelling.txt file significantly improve the French language module of LanguageTool. The new entries expand the dictionary's coverage of proper nouns, place names, adjectives, and specialized terms. This enhancement aligns perfectly with the PR objectives and will contribute to more accurate spell-checking and part-of-speech recognition for French text.

Some notable improvements:

  1. Inclusion of historical and mythological names (e.g., Phrixos, Hellé, Artaban)
  2. Addition of geographical locations (e.g., Héraclée, Asculum)
  3. Expansion of specialized vocabulary (e.g., mésostiche, yogique)

These changes will result in fewer false positives for uncommon but valid words, enhancing the overall user experience of LanguageTool for French language users.

@LucieSteib LucieSteib merged commit e4c8b44 into master Oct 11, 2024
5 checks passed
@LucieSteib LucieSteib deleted the fr/dics branch October 11, 2024 09:24
@coderabbitai coderabbitai bot mentioned this pull request Jan 31, 2025
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