class JsonConverter extends AbstractConfigurationConverter {

    public static String plexusPluralStem(final String key) {
        String[] camelWords = KEY_DELIM.split(key);
        String lastWord = camelWords[camelWords.length - 1].toLowerCase();

        lastWord = DOUBLE_ESS_E_ESS_TO_DOUBLE_ESS.matcher(lastWord).replaceAll("ss");
        lastWord = I_E_ESS_TO_I.matcher(lastWord).replaceAll("i");
        lastWord = I_E_ESS_TO_IE.matcher(lastWord).replaceAll("ie");
        lastWord = PRECEDING_VOWEL_NOT_DOUBLE_ESS.matcher(lastWord).matches()
                ? ESS_SUFFIX_TO_DROP.matcher(lastWord).replaceAll("")
                : lastWord;
        lastWord = REPLACEABLE_WHY_TO_I.matcher(lastWord).replaceAll("i");
        return lastWord;
    }

}