Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. from nltk.tokenize import wordpunct_tokenize
  2.  
  3. doc_words2 = [wordpunct_tokenize(docs[fileid]) for fileid in fileids]
  4.  
  5. print('\n-----\n'.join(wordpunct_tokenize(docs[1][0])))
  6.  
  7. OUTPUT:
  8.  
  9. Good
  10. -----
  11. morning
  12. -----
  13. .
  14. -----
  15. How
  16. -----
  17. are
  18. -----
  19. you
  20. -----
  21. ?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement