I have a dictionary called emoji contains emoji and meaning.
{'': 'excited', '': 'laugh', '' : 'cry'}
and i have a string as an input called tweet. I try to translate this tweet "I'm so excitedd " using this function below.
def replace_emoji(tweet):
return ' '.join(emoji.get(x, x) for x in tweet.split())
But it couldn't work if the emoticons have no space between them like this "". So i get output same as the input. Can someone help me to solve this problem?