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?
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?