I was working on a small shell script to generate stubs for a project we’re working on. After arriving at a rough design and deciding on the class names, method names to be generated, I started generating the stubs (scaffolding?). And came across an amusing non technical issue. getBench() was fine, but getBenchs() wasn’t. It should’ve been getBenches().
Uh, oh! There might be a tool that can generate plurals given a word ?
Doing a quick search threw up a perl library to achieve the same. Three cheers for Perl !!! I’m always amazed at the huge number of modules Perl has. Anyway’s here’s a simple wrapper I wrote for that library which you can use to get plurals for most nouns.
shashi@anacoluthon:~$ pluralize.pl bench
PS: Title Inspiration: “A truly rural frugal ruler’s mural” – tongue twister