code: public static String cleanStemPhrase(String phrase) {
      StringBuilder stringBuilder = new StringBuilder();
      for (String word : replaceIllegalCharacter(phrase).split(" ")) {
        String stemmedWord = stem(word);
        if (StringUtils.isNotEmpty(stemmedWord)) {
          if (stringBuilder.length() > 0) {
            stringBuilder.append(' ');
          }
  
          stringBuilder.append(stemmedWord);
        }
      }
      return stringBuilder.toString();
    }
docs: Remove illegal characters from the string and stem each single word
  
  @return a string that consists of stemmed words