A rule is very simple, it maps a pattern to match with the substitution to make for that pattern.
A rule is very simple, it maps a pattern to match with the substitution to make for that pattern.
A regular expression with a substitution group to be replaced by plural
The substitution for the group in singular
Declaration of an irregular wwhose plural just doesn't match a rule Subclasses can register a pair of words that have an irregular plural form.
Declaration of an irregular wwhose plural just doesn't match a rule Subclasses can register a pair of words that have an irregular plural form. That is, it is not easy to convert the singular to the plural so both must be specified.
The singular form of the word
The plural form of the word
Declaration of a list of non-plural words.
Declaration of a list of non-plural words. Subclasses can register a list of words that do not have plural forms. The plural words will each be the same as their singular word counterpart.
A list of worlds whose plural form is the same as its singular form.
The main interface to this class.
The main interface to this class. Call pluralize to pluralize any word and return its plural form.
The word to be pluralized
The plural form of word
Interface to Pluralizer This object allows us to write
Pluralizer("word")
to obtain the plural form or
Pluralizer("word",count
if we want it to be based on the value of count. This class also calls all the base class methods to install the rules.
Pluralizer("word",count }}} This class also calls all the base class methods to install the rules.
Pluralizer("word") }}}
Pluralizer("word",count
if we want it to be based on the value of count. This class also calls all the base class methods to install the rules.
Pluralizer("word",count }}} This class also calls all the base class methods to install the rules.