private boolean isCons(int index) {
    char ch;
    
    ch = word.charAt(index);
    
    if ((ch == 'a') || (ch == 'e') || (ch == 'i') || (ch == 'o') || (ch == 'u')) return false;
    if ((ch != 'y') || (index == 0)) return true;
    else return (!isCons(index - 1));
  }
A stemmer implementing the Kstem algorithm by Bob Krovetz.
linguistics/src/main/java/com/yahoo/language/simple/kstem/KStemmer.java