import re
 
class translator():
 
    def __init__(self, text):
        self.text = text
 
    def multiple_replace(text):
        dict = {
            "😂": "emoji-1",
            "🤣": "emoji-2",
            "🙃": "emoji-3",
        }
 
        # Create a regular expression  from the dictionary keys
        regex = re.compile("(%s)" % "|".join(map(re.escape, dict.keys())))
 
        # For each match, look-up corresponding value in dictionary
        return regex.sub(lambda mo: dict[mo.string[mo.start():mo.end()]], text)
 
 
test = "🙃😂🙃"
 
fixed = translator.multiple_replace(test)
 
print(fixed)

40081dee2a00474340ca6c33a5f611e288ad8c50
<mask token>


class translator:

    def __init__(self, text):
        self.text = text

    def multiple_replace(text):
        dict = {'😂': 'emoji-1', '🤣': 'emoji-2', '🙃': 'emoji-3'}
        regex = re.compile('(%s)' % '|'.join(map(re.escape, dict.keys())))
        return regex.sub(lambda mo: dict[mo.string[mo.start():mo.end()]], text)


<mask token>

<mask token>


class translator:

    def __init__(self, text):
        self.text = text

    def multiple_replace(text):
        dict = {'😂': 'emoji-1', '🤣': 'emoji-2', '🙃': 'emoji-3'}
        regex = re.compile('(%s)' % '|'.join(map(re.escape, dict.keys())))
        return regex.sub(lambda mo: dict[mo.string[mo.start():mo.end()]], text)


<mask token>
print(fixed)

<mask token>


class translator:

    def __init__(self, text):
        self.text = text

    def multiple_replace(text):
        dict = {'😂': 'emoji-1', '🤣': 'emoji-2', '🙃': 'emoji-3'}
        regex = re.compile('(%s)' % '|'.join(map(re.escape, dict.keys())))
        return regex.sub(lambda mo: dict[mo.string[mo.start():mo.end()]], text)


test = '🙃😂🙃'
fixed = translator.multiple_replace(test)
print(fixed)

import re


class translator:

    def __init__(self, text):
        self.text = text

    def multiple_replace(text):
        dict = {'😂': 'emoji-1', '🤣': 'emoji-2', '🙃': 'emoji-3'}
        regex = re.compile('(%s)' % '|'.join(map(re.escape, dict.keys())))
        return regex.sub(lambda mo: dict[mo.string[mo.start():mo.end()]], text)


test = '🙃😂🙃'
fixed = translator.multiple_replace(test)
print(fixed)

import re
 
class translator():
 
    def __init__(self, text):
        self.text = text
 
    def multiple_replace(text):
        dict = {
            "😂": "emoji-1",
            "🤣": "emoji-2",
            "🙃": "emoji-3",
        }
 
        # Create a regular expression  from the dictionary keys
        regex = re.compile("(%s)" % "|".join(map(re.escape, dict.keys())))
 
        # For each match, look-up corresponding value in dictionary
        return regex.sub(lambda mo: dict[mo.string[mo.start():mo.end()]], text)
 
 
test = "🙃😂🙃"
 
fixed = translator.multiple_replace(test)
 
print(fixed)
