Skip to content

Instantly share code, notes, and snippets.

@megha444
Created September 21, 2020 13:51
Show Gist options
  • Save megha444/d76c6bb6946cbdcff1f6314dfd2f03bc to your computer and use it in GitHub Desktop.
Save megha444/d76c6bb6946cbdcff1f6314dfd2f03bc to your computer and use it in GitHub Desktop.
from nltk.tokenize import sent_tokenize, word_tokenize
word_tokens=[]
i=0
for line in lines:
words = word_tokenize(line)
word_tokens.insert(i,words)
i=i+1
print (word_tokens)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment