tj / lingo

Linguistics module for Node - inflection, transformation, i18n and more
MIT License
270 stars 32 forks source link

Make -ife -> -ives the exception, not the rule #30

Open GPHemsley opened 10 years ago

GPHemsley commented 10 years ago

As discussion in #27 showed, the only words that end in -ife that are pluralized as -ives are wive, life, and knife:

http://www.scrabblefinder.com/ends-with/ife/ https://en.wiktionary.org/wiki/Rhymes:English:-a%C9%AAf

Having it as a rule rather than an exception causes all sorts of unnecessary problems for singularizing -ives words, which should just have their -s removed.

Thus, I propose adding the following irregular rule for pluralization:

.plural(/(w|l|kn)ife$/i, "$1ves")

in place of:

.plural(/(?:([^f])fe|([lr])f)$/i, "$1$2ves")

and removing the following singularization rule:

.singular(/([^f])ves$/i, "$1fe")

(There may be other tweaks necessary to handle singular words that end in -f.)

WickedSik commented 10 years ago

@GPHemsley you wouldn't be inclined to make this a pull request? :angel:

GPHemsley commented 10 years ago

I'm not an active user of the library, just an interested onlooker, so it's not a high priority for me. I could do it eventually, if you don't mind waiting, but I'm not set up for it at the moment.