import re


def text_normalization(text):
    """
    Remove extra spaces, punctuation, HTML Tags and other special characters
    Adapted From: Fake News Challenge - https://github.com/hanselowski/athene_system

    :param text: string to normalize
    :return: Normalized text
    """
    text = re.sub(u"<p>", u"", text)
    text = re.sub(u"</p>", u"", text)
    text = re.sub(u'&#8217;', u"'", text)
    text = re.sub(u'\u2019', u"'", text)
    text = re.sub(u'”', u'"', text)
    text = re.sub(u'“', u'"', text)
    text = re.sub(u'&#160;', u" ", text)
    text = re.sub(u'&#8211;', u"-", text)
    text = re.sub(u'\u000a', u"", text)
    text = re.sub(u'\u2014', u"-", text)
    text = re.sub(u'\n+$', u" ", text)
    text = re.sub(u'\s+', u" ", text)
    text = re.sub(u'^\s+', u"", text)
    text = re.sub(u'\s+$', u"", text)
    text = re.sub(u"\s{2,}", u" ", text)
    text = re.sub(u"\.{2,}", u".", text)
    return text