MehdiK/Humanizer — pull request #40 by robdmoore (2013-12-30 15:25:48+00:00)
Title: Issue 38 - Possible fix

Created a way of detecting if a word is already singular or plural that passes all existing test cases - there may be others that don't pass though?

Also, this won't be the most performant thing ever...

Simple code change though :)

Originally I started tracking the irregulars in a list of regexes to make a special case for them (i.e. if it's an irregular singular and you are calling Singularize then return), but in the end the logic I have in there seems to work for those special cases.