code: public String singularize( Object word ) {
          if (word == null) return null;
          String wordStr = word.toString().trim();
          if (wordStr.length() == 0) return wordStr;
          if (isUncountable(wordStr)) return wordStr;
          for (Rule rule : this.singulars) {
              String result = rule.apply(wordStr);
              if (result != null) return result;
          }
          return wordStr;
      }
docs: Returns the singular form of the word in the string.
  
  Examples:
  
  <pre>
  inflector.singularize(&quot;posts&quot;)             #=&gt; &quot;post&quot;
  inflector.singularize(&quot;octopi&quot;)            #=&gt; &quot;octopus&quot;
  inflector.singularize(&quot;sheep&quot;)             #=&gt; &quot;sheep&quot;
  inflector.singularize(&quot;words&quot;)             #=&gt; &quot;word&quot;
  inflector.singularize(&quot;the blue mailmen&quot;)  #=&gt; &quot;the blue mailman&quot;
  inflector.singularize(&quot;CamelOctopi&quot;)       #=&gt; &quot;CamelOctopus&quot;
  </pre>
  
  
  
  Note that if the {@link Object#toString()} is called on the supplied object, so this method works for non-strings, too.
  
  
  @param word the word that is to be pluralized.
  @return the pluralized form of the word, or the word itself if it could not be pluralized
  @see #pluralize(Object)