<commit_before>"""
Created by anthony on 15.10.17
echo_handler
"""
from telegram.ext import MessageHandler, Filters


def echo():
    return MessageHandler(Filters.text, _handle_echo)


def _handle_echo(bot, update):
    update.message.reply_text(f'You said "{update.message.text}"')<commit_msg>t-1 added logger decorator to echo handler<commit_after>"""
Created by anthony on 15.10.17
echo_handler
"""
from telegram.ext import MessageHandler, Filters
from utils.handler_utils import add_timestamp, log_duration


def echo():
    return MessageHandler(Filters.text, _handle_echo)


def _handle_echo(bot, update):
    update.message.reply_text(text_to_reply(update.message.text))


@add_timestamp
@log_duration
def text_to_reply(text):
    return text
{'fraction_non_alphanumeric': 0.10133333333333333, 'fraction_numerical': 0.017333333333333333, 'mean_word_length': 5.827272727272727, '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': '5797407', 'n_tokens_mistral': 247, 'n_tokens_neox': 236, 'n_words': 60}