import re


def clean_text(text):
    """
    Preprocess text for NLP applications: Lowercase, remove markups
    :param text: raw text
    :return: processed tokenized text
    """
    # Lowercase text
    text = text.lower()

    # Remove carriage returns and new lines
    text = re.sub('\r?\n|\r', ' ', text)

    # Remove Trademarks, Copyright, and Registered
    text = re.sub('(™|®|©|&trade;|&reg;|&copy;|&#8482;|&#174;|&#169;)', '', text)

    return text