Spanish Rules¶
Spanish pluralization and singularization rules.
This module defines the complete set of Spanish pluralization
rules used by pluralio. It is imported automatically when
import pluralio is executed, which triggers the registration
of the es 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 words ending in a stressed vowel +
íorú(e.g."rubí" → "rubíes"), words with accent shifts (e.g."joven" → "jóvenes","examen" → "exámenes"), and foreign loanwords (e.g."club" → "clubs"). 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 an accent that the plural does not have (e.g.
"alemanes" → "alemán","inglés" → "ingleses").Regex rules: Ordered patterns applied to words that are not in the irregular or uncountable lists. The first matching rule wins. Rules cover common Spanish pluralization patterns: -
z→ces-ión→iones,ón→ones, etc. - Vowel ending → adds- Consonant ending → addesUncountable words: Words that are invariable — their plural form is identical to their singular form. This includes days of the week ending in
s, words ending inx, Greek-origin words ending inis, compound words, and foreign loanwords.
Reference: ref/rules.md for the full rules documentation.