import string
import re


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

    Do what clean_text_round1 does, adding:
    Remove pontuations, except accents.
    Remove words if less than 3 letters
    Remove some special chars commom in papers
    """
    remove = string.punctuation
    remove = remove.replace("´", "")
    remove = remove.replace("^", "")
    remove = remove.replace("~", "")
    remove = remove.replace("`", "")
    text = re.sub(r'[%s]' % re.escape(remove), '', text)
    text = text.replace("𝑐𝑜𝑣", '')
    text = text.replace('𝑥𝑖', '')
    text = text.replace('𝐸(𝑦|𝑥)', '')
    text = text.replace('𝑝𝑙𝑖𝑚', '')
    text = re.sub(r'\b\w{1,2}\b', '', text)
    text = text.lower()
    text = re.sub(r'\[.*?\]', '', 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)

    return text