public static String tokenizeSmileys ( String text ) { for ( Map . Entry < String , String > smiley : SMILEYS_MAPPING . entrySet ( ) ) { text = text . replaceAll ( smiley . getKey ( ) , smiley . getValue ( ) ) ; } return text ; }
Replaces all the SMILEYS_MAPPING within the text with their tokens .