Open pineapplemachine opened 7 years ago
On Wed, Nov 02, 2016 at 03:58:32PM -0700, Sophie Kirschner wrote:
I happened to notice that, even setting aside exceptions, the current implementation only accounts for a subset of pluralization rules. A more complete progression of conditionals would be:
Yeah, it was extremely minimal just for a few words.
But adding these are good ideas.
I happened to notice that, even setting aside exceptions, the current implementation only accounts for a subset of pluralization rules, and is incorrect for most words terminated by a vowel. A more complete progression of conditionals would be:
If the word is a single lower-case character then the plural is (usually) formed by adding "'s", e.g.
a's
.If the word is a single upper-case character then the plural is (usually) formed by adding "s", e.g.
As
.If the word ends in "o", then the plural is (usually) formed by adding "es", e.g.
heroes
.If the word ends in "y" then the plural is (usually) formed by dropping "y"; adding "ies", e.g.
flies
.If the word ends in "f" but not "ff" then the plural is (usually) formed by dropping "f" and adding "ves", e.g.
dwarves
,cliffs
.If the word ends in "ife" then the plural is (usually) formed by dropping "fe" and adding "ves", e.g.
knives
.If the word ends in "s" but not "ss" and the word is a single syllable then the plural is (usually) formed by adding "ses", e.g.
busses
,fusses
.If the word ends in "s", "z", "x", "sh", or "ch" then the plural is (usually) formed by adding "es", e.g.
glasses
,boxes
,wrenches
.In all other cases the plural is (usually) formed by adding "s".