<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import

import re

from pyemojify.emoji import emoji_table


def emojify(text):
    emoji_keys = re.findall(r':\w+:', text)
    for emoji_key in emoji_keys:
        raw_emoji = emoji_table.get(emoji_key, emoji_key)
        text = text.replace(emoji_key, raw_emoji)
    return text<commit_msg>Bug fix for :+1: and :-1:<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import

import re

from pyemojify.emoji import emoji_table


def emojify(text):
    emoji_keys = re.findall(r':\S+:', text)
    for emoji_key in emoji_keys:
        raw_emoji = emoji_table.get(emoji_key, emoji_key)
        text = text.replace(emoji_key, raw_emoji)
    return text
{'fraction_non_alphanumeric': 0.11734693877551021, 'fraction_numerical': 0.00510204081632653, 'mean_word_length': 3.590643274853801, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1417389', 'n_tokens_mistral': 303, 'n_tokens_neox': 306, 'n_words': 66}