Added function to generate a hash table of word->frequency pairs.