This function use the unigram, bigram and trigram to predict the next word.
It will return the top 10 most probable result according to the n-grams.
It first check if there is any row in the trigram match the last two words in the sentence. If yes, it returns the top 10 highest proportion result.
If there is no row in the trigram that matches the sentence, it check from the bigram and return the result if it can find any row that matches.
If it still could not find any matches, it will return the top 10 highest frequency word in the unigram.