How to identify same emoji with different colours?
Example: 👍🏻 👍🏽 👍 the should be considered as being the same
Edit: Currently I am using emoji package
import regex
import emoji
exm = "poli kariku fans adi like 👍🏻 👍🏽 👍 sub tharamo"
characters = regex.findall("\X",exm)
for char in character:
if char in emoji.UNICODE_EMOJI:
#do something
There is no method available on the emoji package to treat same symbols with different colors similar. However, we can achieve this by comparing the emoji names with the common string (Here it is thumbs_up
)
Try the below code.
import regex
import emoji
exm = "poli kariku fans adi like 👍🏻 👍🏽 👍 sub tharamo"
characters = regex.findall("\X",exm)
for char in characters:
if char in emoji.UNICODE_EMOJI:
if "thumbs_up" in (emoji.demojize(char)):
print("It is thumbs_up")
For the list of emojis supported and their names refer to the source code here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With