Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- word_frequency = nltk.FreqDist(merged_lemmatizedTokens) #obtains frequency distribution for each token
- print("nMost frequent top-10 words: ", word_frequency.most_common(10))
- word_frequency.plot(10, title='Top 10 Most Common Words in Corpus')
- plt.savefig('img_top10_common.png')
- plt.ion()
- word_frequency.plot(10, title='Top 10 Most Common Words in Corpus')
- plt.savefig('img_top10_common.png')
- plt.ioff()
- plt.show()
Add Comment
Please, Sign In to add comment