Skip to content

Instantly share code, notes, and snippets.

@MLWhiz
Created February 9, 2019 08:02
Show Gist options
  • Save MLWhiz/8cd21d05e1fbdf0c8187e2c798b2ea30 to your computer and use it in GitHub Desktop.
Save MLWhiz/8cd21d05e1fbdf0c8187e2c798b2ea30 to your computer and use it in GitHub Desktop.
def clean_sentence(x):
x = x.lower()
x = clean_text(x)
x = clean_numbers(x)
x = replace_typical_misspell(x)
x = remove_stopwords(x)
x = replace_contractions(x)
x = lemma_text(x)
x = x.replace("'","")
return x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment