Skip to content

Instantly share code, notes, and snippets.

@shahules786
Created October 23, 2020 12:01
Show Gist options
  • Save shahules786/77087383ba60dc9425be411d0cfb226c to your computer and use it in GitHub Desktop.
Save shahules786/77087383ba60dc9425be411d0cfb226c to your computer and use it in GitHub Desktop.
corpus
def preprocess_text(text: list):
"""Function to preprocess and create corpus"""
new_corpus = []
for text in text:
words = [w for w in text.split()]
new_corpus.append(words)
return new_corpus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment