def clean_corpus(df):
    """
    Clean corpus of text for all documents.
    """
    df.Text = df.Text.replace('\s+', ' ', regex=True)  # Remove duplicate spaces
    df.Text = df.Text.str.encode('ascii', 'ignore').str.decode('utf-8')   # Encode in ascii to remove weird characters such as \uf0a7
    #df.Text = df.Text.str.lower()  # Lower case all strings
    return df