Skip to content

Instantly share code, notes, and snippets.

@mlai-demo
Last active April 18, 2020 19:08
Show Gist options
  • Save mlai-demo/d9dba656e856aba2bee12acc490ab7e0 to your computer and use it in GitHub Desktop.
Save mlai-demo/d9dba656e856aba2bee12acc490ab7e0 to your computer and use it in GitHub Desktop.
sample = open('all_docs.txt', 'r', encoding = 'utf-8')
s = sample.read()
f = s.replace("\n", " ")
data = []
for i in tqdm(sent_tokenize(f)):
temp = []
for j in word_tokenize(i):
temp.append(j.lower())
data.append(temp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment