I am transliterating data into India language using python in google colab, but encountered error: AttributeError: module 'emoji' has no attribute 'UNICODE_EMOJI'
The error occurs to the second line in the code:
for word in line_list:
if word in emoji.UNICODE_EMOJI:
new_line_list.append(emoji.demojize(word))
emoji package in installed and imported version is 2.0.0
You can use the function
distinct_emoji_list()to extract emojis in a string and return a list of found emojis, then callemoji.demojize()on each emoji in that list to convert it into its meaning.so having:
Printing new_line_list would give