The script uses the Alise in Wonderland as the default text file with 3,736 lines and 28,601 words. When scaling up to larger text files the processing time was noticeable.
The Alise default file must be download and placed the same directory as the script.
Thanks to Tim Smith's post there was over 2000% increase in the performance when using a different hash table method.
This script can also be found on