1

There is a variable naming rule that I would like to enforce in my software:

Variable names of scalar types should be written in singular form.

Variable names of collection types should be written in plural form.

I'm looking for a list of english words that document spelling in both singular and plural form.
I realize there are many words whose plurality is ambiguous.
If that were notated as well, it would be a bonus.

Is there a well established source where I can find or derive this type of information?


Princeton has a lexical database for English, but I don't see plurality as part of their data.

migrated from english.stackexchange.com Oct 23 '16 at 16:54

This question came from our site for linguists, etymologists, and serious English language enthusiasts.

  • 3
    Dictionaries are good places to look. – Mick Oct 21 '16 at 20:43
  • 3
    I'm sorry but questions asking for lists are off-topic here. – Centaurus Oct 21 '16 at 21:07
  • You might look into the answers for this question, since what you're looking for are nouns: stackoverflow.com/questions/2553274/… – vpn Oct 21 '16 at 21:16
  • @Centaurus Ok. I thought it might be. When I typed "Where can I find a list ..." many other questions appeared in this format that were not closed. After reading the rules, I didn't see anything discouraging a user from asking for data, so I decided to post. – Trevor Hickey Oct 21 '16 at 21:16
  • You could look for (a) a list of nouns and (b)lists of irregular plural forms (Wikipedia is good for the latter). – Edwin Ashworth Oct 21 '16 at 21:33
  • 1
    Since you're into software, you could take a look at Ruby on Rails ActiveSupport::Inflector.pluralize. It does have a dictionary of irregular forms but I couldn't find the source file. Maybe the techies on StackOverflow can help you. – Mick Oct 21 '16 at 22:25
  • @Mick Perfect. A set of regular expression rules, + a list of exceptions. That will work better than I could have imagined. – Trevor Hickey Oct 21 '16 at 23:50
  • Just occasionally, StackExchange is the best place to look. ;-) – Mick Oct 22 '16 at 0:21
  • This is unclear. Do you want a reference that an indivudual can look up individual terms as needed, or do you want a database/spreadsheet/electronic list on which to run algorithms? – Mitch Oct 23 '16 at 23:36
  • I was looking for an algorithmic way to convert any word to its plural or singular form. Initially, I thought I would need a database of all English words. It turns out, the better approach is to have a small list of irregulars/uncountables, followed by a set of regular expressions to derive the necessary adjustments. This is what I have seen done in the ruby on rails framework, PHP doctrine, as well as MongoDB. – Trevor Hickey Oct 24 '16 at 1:03
1

Mongodb does this, although not perfectly. Their code is the best starting place I can think of.

  • This is another good solution. Mongodb seems to only have only plural conversions; not singular. – Trevor Hickey Oct 24 '16 at 1:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .