import re


def clean_text_round1(text):
    """
    Clean up text data.

    Make text lowercase, remove text in square brackets, remove
    punctuation, remove digits in general, remove urls, remove
    emails and remove "" caracteres.
    unidecode = If there is a non ASCII caracter, turn it into
    ASCII readable --> not used because it hinders the Stemming.
    """
    text = text.lower()
    text = re.sub(r'\[.*?\]', '', text)
    #  r'[%s]' % re.escape(string.punctuation) remove accents from words,
    # which hinders the Stemming process.
    # text = re.sub(r'[%s]' % re.escape(string.punctuation), '', text)
    text = re.sub(r'[!,:\-;\.\?\(\)]', '', text)
    text = ''.join(i for i in text if not i.isdigit())
    text = re.sub(r'^https?:\/\/.*[\r\n]*', '', text)
    text = re.sub(r'http\S+', '', text)
    text = re.sub(r'[‘’“”…]', '', text)
    text = re.sub('\n', '', text)
    # unidecode(text) remove accents from words, which hinders Stemming process
    # so it was not done.
    # text = unidecode(text)

    return text