Calculating the frequency distributions of words

A frequency distribution counts the number of occurrences of distinct data values.  These are of value as we can use them to determine which words or phrases within a document are most common, and from that infer those that have greater or lesser value.

Frequency distributions can be calculated using several different techniques.  We will examine them using the facilities built into NLTK. 

Get Python Web Scraping Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.