@Test void replaceIllegalCharacter() { assertEquals("hello world", Stemmer.replaceIllegalCharacter("Hello__world!")); assertEquals("hello world 1234", Stemmer.replaceIllegalCharacter("Hello__world! 1234")); assertEquals("hello 45 world 1234", Stemmer.replaceIllegalCharacter("Hello_#45_world! 1234")); }
public static String replaceIllegalCharacter(String string) { return string.replaceAll(ILLEGAL_REGEX_PATTERN, " ").replaceAll(" +", " ").trim().toLowerCase(); }
Stemmer { public static String replaceIllegalCharacter(String string) { return string.replaceAll(ILLEGAL_REGEX_PATTERN, " ").replaceAll(" +", " ").trim().toLowerCase(); } }
Stemmer { public static String replaceIllegalCharacter(String string) { return string.replaceAll(ILLEGAL_REGEX_PATTERN, " ").replaceAll(" +", " ").trim().toLowerCase(); } private  Stemmer(); }
Stemmer { public static String replaceIllegalCharacter(String string) { return string.replaceAll(ILLEGAL_REGEX_PATTERN, " ").replaceAll(" +", " ").trim().toLowerCase(); } private  Stemmer(); static String cleanStemPhrase(String phrase); static String stem(String word); static String stemAndJoin(Set<String> terms); static String replaceIllegalCharacter(String string); }
Stemmer { public static String replaceIllegalCharacter(String string) { return string.replaceAll(ILLEGAL_REGEX_PATTERN, " ").replaceAll(" +", " ").trim().toLowerCase(); } private  Stemmer(); static String cleanStemPhrase(String phrase); static String stem(String word); static String stemAndJoin(Set<String> terms); static String replaceIllegalCharacter(String string);  }