French Rules

French pluralization and singularization rules.

This module defines the complete set of French pluralization rules used by pluralio. It is imported automatically when import pluralio is executed, which triggers the registration of the fr language in the global registry.

The rules are organized into four categories:

  1. Irregular plurals: Words that do not follow regex patterns and must be memorized. This includes -al words that take -als instead of the default -aux (e.g. "bal" "bals", "festival" "festivals"), -ail words that take -aux (e.g. "travail" "travaux"), -ou words that take -oux (e.g. "bijou" "bijoux"), special plurals ("œil" "yeux", "monsieur" "messieurs"), and foreign loanwords (e.g. "weekend" "weekends"). The inverse mapping (plural → singular) is auto-generated.

  2. Extra singulars: Additional plural → singular mappings that cannot be derived from the irregular plurals. These handle cases where the singular form requires a different ending than the regex would produce (e.g. "travaux" "travail" instead of "traval", "yeux" "œil").

  3. Regex rules: Ordered patterns applied to words that are not in the irregular or uncountable lists. The first matching rule wins. Rules cover common French pluralization patterns: - alaux, eaueaux, eueux - s/x/z → invariable, default → add s

  4. Uncountable words: Words that are invariable — their plural form is identical to their singular form. This includes abstract nouns (information, courage), materials (or, fer), foods (pain, lait), invariable -s/-x/-z words (fois, croix, nez), and foreign loanwords (jazz, rock).

Known limitations:

  • ``-aux`` ambiguity: travaux travail (should be -ail, not -al). Covered by _EXTRA_SINGLES for common words. Obscure -ail plurals will singularize to -al.

  • ``-ou`` vs ``-oux``: Most -ou words take +s (trou trous). The -oux exceptions (bijou bijoux) are in irregulars. Singularization of -oux-ou is NOT in regex; handled by irregulars only.

  • ``-al`` vs ``-als``: Most -al words take -aux, but ~7 exceptions take -als (bal bals). These are in irregulars.

Reference: ref/rules.md for the full rules documentation.