Guest User

Untitled

a guest
Mar 24th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. # make a list containing all words in the corpus
  2. vocab = [word for words in documents for word in words]
  3. # keep a set of unique words
  4. vocab = list(set(vocab))
  5. m = len(vocab)
Add Comment
Please, Sign In to add comment