NationStates Jolt Archive

Minor Improvement Idea: Correct Plurals

01-03-2009, 13:49
Given that the floor seems to be open for improvement ideas, I have a simple one to make - the parts of the game that make text should understand how to make English plurals. Part 1 is easy: there are simple rules for how regular plurals are formed. The regular plural of ostrich is ostriches, not ostrichs. The plural of pony is ponies, not ponys. The plural of albatross is albatrosses, not albatrosss.

Part 2 is more work, but I still suggest it. There are online lists of irregular plurals. When a currency or animal is a real English word, the game should recognize and pluralize it correctly. The plural of mouse is mice, of ox is oxen, of protozoon is protozoa.

I started to ask that the game get plurals of real world currencies right too, but it turns out this is a mess. Multiple countries use the real, the krona and the lira, with different plurals - so this is a problem without a really good solution, and I'd be happy if the game could just avoid pluralizing litas as litass. (Ironically, zlotys is a legitimate plural of zloty, so I must admit that I'm suggesting a change that will cause the game to get that one wrong.)

This is a small thing, but I wince every time I see something like foxs in a national summary, and it would be easy to do better.

Thanks for considering it!
Razril Island
01-03-2009, 14:01
It's a small thing that requires a bit of coding to do correctly. English isn't exactly the most elegant of languages.
01-03-2009, 14:22
Actually, part 1 really is easy. Here are the rules as I recall them.

Regular plurals are formed by adding s to the end of a word, except:

Words ending in Cy (c being any consonant) pluralize to Cies
Words ending in j,s,x,z pluralize by adding -es. Sometimes the last letter is doubled (quiz->quizzes), but I'm willing to be forgiving if the game comes up with quizes.
Words ending in sh pluralize by adding -es.
Words ending in ch take either -s or -es depending on how they're pronounced - but I'm willing to put up with stomaches to get rid of roachs.

I think that's all - I may have forgotten one or two cases, but that's pretty much it.
Bears Armed
01-03-2009, 17:42
I like this idea.
Of course Pirate nations would still be stuck with "piece of eights" rather than "pieces of eight", but one can't have everything... ;)

Hr'rrm, unless players were allowed to specify both singular and plural forms for their national animals and currencies?
Charlotte Ryberg
02-03-2009, 17:33
This is an excellent idea! It would make the game tidier.
03-03-2009, 11:13
It still would take quite a bit of coding. You have to remember that NationStates is not a simple coded game. Max was an amature coder when he created NationStates and it's not simple code.

I believe that is covered somewhere, but I forget exactly where.
05-03-2009, 17:48
I think the creator of NSeconomy (Commerce Heights?) did something like this when he created the exchange feature.
06-03-2009, 01:20
It's not hard, except to track down all the places words need to be pluralized. Help me out by finding them. :)
06-03-2009, 01:58
The place I've always noticed it is in issues. And if all the issues can be searched as a unit, I expect that looking for @@ANIMAL@@s and @@CURRENCY@@s will find the specific issues easily.

It's possible there might be a few other places, but I've never noticed the problem elsewhere. I think the national summaries are free of the problem, except where listing issue results.
06-03-2009, 05:03
@@ANIMAL@@s and @@CURRENCY@@s should be the only culprits.
06-03-2009, 06:03
This would be a nice feature. Originally, I had my currency as Spartz, but after getting a few issues with Spartzs as the plural, I decided to add an 'E' at the end, making it Spartze, which fixed the problem, since Spartzes was now the plural. But for other people, it may not work so well. I think it would be better if people gave their own correct plural form of their word.