Login using Social Account
     Continue with GoogleLogin using your credentials
There are more than 50,000 words in the vocabulary. So let us truncate it to have only 10,000 most common words.
Set vocab_size to 10000.
vocab_size = << your code comes here >>
Extract the top 10,000 most frequently occurring words from vocabulary and store these words in truncated_vocabulary list(let us use the list comprehension method to do so).
<< your code comes here >> = [ word for word, count in vocabulary.most_common()[:vocab_size]]
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
Note - Having trouble with the assessment engine? Follow the steps listed here
Loading comments...