Pluralize a word
Irregular plurals list adapted from the Automatically Generated Inflection Database (AGID).
See plu-package for more details.
A character vector of English words to be pluralized
What level of irregularity to use in pluralization.
"moderate"
uses the most common pluralization.
"conservative"
uses the most common irregular plural if one exists,
even if a regular plural is more common.
"liberal"
uses a regular plural if it exists, even if an irregular
plural is more common.
"none"
attempts to apply regular noun pluralization rules to all words.
See section "Irregular plurals" for more details.
Defaults to "moderate"
.
The default can be changed by setting options(plu.irregulars)
.
See examples in ralize()
for more details.
The character vector x
pluralized
Many words in English have both regular and irregular plural forms.
For example, the word "person" can be pluralized as "persons" or "people",
and the word "formula" can be pluralized as "formulas" or "formulae".
plu
offers several options for how to handle words with multiple plurals.
The moderate
list attempts to apply the most common pluralization,
whether it is regular or irregular.
This chooses the irregular plural "people" but the regular plural "formulas".
The conservative
list attempts to apply an irregular plural to every word
that has one.
This chooses "people" and "formulae", but still uses regular plurals for
words that have no irregular plural form.
The liberal
list attempts to apply a regular plural to every word that
has one.
This chooses "persons" and "formulas", but still uses irregular plurals for
words that have no common regular plural, like "women".
Many words in English have invariant plurals that look exactly the same as
their singular forms, like "fish" or "deer".
The liberal
list attempts to use regular plurals for these words,
producing "fishes" and "deers".
The none
list applies regular pluralization rules to all words, even
those with no common regular plural.
This produces, for example, "womans" as a plural for "woman" even though this
is not a common English word.
plu_ral()
to pluralize an English phrase based on a condition
plu::ralize("word")
#> [1] "words"
plu::ralize(c("group", "word"))
#> [1] "groups" "words"
plu::ralize(c("formula", "person", "child"), irregulars = "conservative")
#> [1] "formulae" "people" "children"
plu::ralize(c("formula", "person", "child"), irregulars = "moderate")
#> [1] "formulas" "people" "children"
plu::ralize(c("formula", "person", "child"), irregulars = "liberal")
#> [1] "formulas" "persons" "children"
plu::ralize(c("formula", "person", "child"), irregulars = "none")
#> [1] "formulas" "persons" "childs"