Generalizing emoticonize method and unemoticonize method