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