private boolean endsIn(char a, char b, char c) {
    if (3 > k) return false;
    if (word.charAt(k - 2) == a && word.charAt(k - 1) == b
        && word.charAt(k) == c) {
      j = k - 3;
      return true;
    }
    return false;
  }
A stemmer implementing the Kstem algorithm by Bob Krovetz.
linguistics/src/main/java/com/yahoo/language/simple/kstem/KStemmer.java