Added some post processing to sum up the total number of words as well as calculating the prior probability for each loaded category.