tj / lingo

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

Special plural cases #12

Open philip-peterson opened 12 years ago

philip-peterson commented 12 years ago

I came across an interesting problem: the function isPlural determines if a word is plural or not by converting it to singular and then pluralizing it, testing to see if the result was the same as the original input. However, some words, like 'walrus', have several plural forms.

'Walrus' is the preferred plural form of 'walrus', but 'walruses' is also valid. Thus, isPlural('walruses') should return true, but it doesn't (and can't, while still correctly pluralizing 'walrus' to 'walrus'). Perhaps some system for special plurals like this could be devised?