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:
Irregular plurals: Words that do not follow regex patterns and must be memorized. This includes
-alwords that take-alsinstead of the default-aux(e.g."bal" → "bals","festival" → "festivals"),-ailwords that take-aux(e.g."travail" → "travaux"),-ouwords 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.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").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: -
al→aux,eau→eaux,eu→eux-s/x/z→ invariable, default → addsUncountable 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/-zwords (fois,croix,nez), and foreign loanwords (jazz,rock).
Known limitations:
``-aux`` ambiguity:
travaux → travail(should be-ail, not-al). Covered by_EXTRA_SINGLESfor common words. Obscure-ailplurals will singularize to-al.``-ou`` vs ``-oux``: Most
-ouwords take+s(trou → trous). The-ouxexceptions (bijou → bijoux) are in irregulars. Singularization of-oux→-ouis NOT in regex; handled by irregulars only.``-al`` vs ``-als``: Most
-alwords take-aux, but ~7 exceptions take-als(bal → bals). These are in irregulars.
Reference: ref/rules.md for the full rules documentation.