-
-
Save amankharwal/1ed5b2f2b0285cbd14f2b31a9263b1c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def clean_text(txt): | |
txt = "".join(v for v in txt if v not in string.punctuation).lower() | |
txt = txt.encode("utf8").decode("ascii",'ignore') | |
return txt | |
corpus = [clean_text(x) for x in all_headlines] | |
corpus[:10] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment