Convert emoji into text in Python

Converting emoticons or emoji into text in Python can be done using the demoji module. It is used to accurately remove and replace emojis in text strings. To install the demoji module the below command can be used:

pip install demoji

The demoji module also require an initial download of data from the Unicode Consortium’s emoji code repository as the emoji list itself is frequently updated and changed. The below code block should be used for the above-mentioned download:

filter_none

edit
close

play_arrow

link
brightness_4
code

import demoji
  
demoji.download_code()

chevron_right


Output:

Now that we are all set to use the demoji module we can jump into a few examples.

Example 1:



Output:

Example 2:


Output:

Example 3:

Output:

Example 4:

Output:

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.