private String singular(String word) {
        if (requireNonNull(word).endsWith("ies")) {
            return word.substring(0, word.length() - 3) + "y";
        } else if (word.endsWith("s")) {
            return word.substring(0, word.length() - 1);
        } else {
            return word;
        }
    }
Returns the specified word in singular.

@param word the word
@return the word in singular
common-parent/codegen/src/main/java/com/speedment/common/codegen/controller/SetGetAdd.java