@Test public void testTokenizeSmileys() { logger.info("tokenizeSmileys"); String text = "Test, test δοκιμή :) :( :] :[ test test"; String expResult = "Test, test δοκιμή PREPROCESSDOC_EM1 PREPROCESSDOC_EM3 PREPROCESSDOC_EM8 PREPROCESSDOC_EM9 test test"; String result = StringCleaner.tokenizeSmileys(text); assertEquals(expResult, result); }
public static String tokenizeSmileys(String text) { for(Map.Entry<String, String> smiley : SMILEYS_MAPPING.entrySet()) { text = text.replaceAll(smiley.getKey(), smiley.getValue()); } return text; }
StringCleaner { public static String tokenizeSmileys(String text) { for(Map.Entry<String, String> smiley : SMILEYS_MAPPING.entrySet()) { text = text.replaceAll(smiley.getKey(), smiley.getValue()); } return text; } }
StringCleaner { public static String tokenizeSmileys(String text) { for(Map.Entry<String, String> smiley : SMILEYS_MAPPING.entrySet()) { text = text.replaceAll(smiley.getKey(), smiley.getValue()); } return text; }  }
StringCleaner { public static String tokenizeSmileys(String text) { for(Map.Entry<String, String> smiley : SMILEYS_MAPPING.entrySet()) { text = text.replaceAll(smiley.getKey(), smiley.getValue()); } return text; }  static String tokenizeURLs(String text); static String tokenizeSmileys(String text); static String removeExtraSpaces(String text); static String removeSymbols(String text); static String unifyTerminators(String text); static String removeAccents(String text); static String clear(String text); }
StringCleaner { public static String tokenizeSmileys(String text) { for(Map.Entry<String, String> smiley : SMILEYS_MAPPING.entrySet()) { text = text.replaceAll(smiley.getKey(), smiley.getValue()); } return text; }  static String tokenizeURLs(String text); static String tokenizeSmileys(String text); static String removeExtraSpaces(String text); static String removeSymbols(String text); static String unifyTerminators(String text); static String removeAccents(String text); static String clear(String text);  }