Word count example

These programs will count words in a given text, plot a bar chart of the 10 most common words, and test Zipf's law on the two most common words.

Usage

Four texts are provided in the data/ directory:

$ ls data/
LICENSE_TEXTS.md abyss.txt        isles.txt        last.txt         sierra.txt

To calculate the word frequency distribution of a given text file:

$ python source/wordcount.py data/abyss.txt output.dat