How to use the emoji.unicode_codes.UNICODE_EMOJI function in emoji

To help you get started, we’ve selected a few emoji examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github carpedm20 / emoji / emoji / core.py View on Github external
def replace(match):
        codes_dict = unicode_codes.UNICODE_EMOJI_ALIAS if use_aliases else unicode_codes.UNICODE_EMOJI
        val = codes_dict.get(match.group(0), match.group(0))
        return delimiters[0] + val[1:-1] + delimiters[1]
github Pext / Pext / module_emoji.py View on Github external
def getEntries(self):
        entryList = []

        for emoji, code in sorted(unicode_codes.UNICODE_EMOJI.items()):
            entryList.append([emoji, '{0} {1}'.format(emoji, code)])

        return entryList
github kdrag0n / pyrobud / pyrobud / util / text.py View on Github external
def has_emoji(text: str) -> bool:
    return any(c in emoji.unicode_codes.UNICODE_EMOJI for c in text)
github carpedm20 / emoji / emoji / core.py View on Github external
def emoji_count(string):
   """Returns the count of emojis in a string"""
   c=0
   for i in string:
     if i in unicode_codes.UNICODE_EMOJI:
	      c=c+1
   return(c)
github facebookresearch / ParlAI / parlai / tasks / twitter / build.py View on Github external
def replace_emoji(x):
    if x in UNICODE_EMOJI.keys():
        return ' ' + UNICODE_EMOJI[x].replace(':', '@') + ' '
    else:
        return x
github facebookresearch / ParlAI / parlai / tasks / twitter / build.py View on Github external
def replace_emoji(x):
    if x in UNICODE_EMOJI.keys():
        return ' ' + UNICODE_EMOJI[x].replace(':', '@') + ' '
    else:
        return x