Calculation of Unigram, Bigram and Trigram Calculations