void (@NotNull String text, @NotNull Set<? super String> result, @NotNull Set<String> stopWords) { String toLowerCase = StringUtil.toLowerCase(text); final String[] options = WORD_SEPARATOR_CHARS.split(toLowerCase); for (String opt : options) { if (stopWords.contains(opt)) { continue; } opt = PorterStemmerUtil.stem(opt); if (opt == null) { continue; } result.add(opt); } }