Phanindra Reddigari
1/18/2017
Analyze the Swiftkey text files (blogs, twitter, and news) and develop a simple Shiny UI for next word prediction in a free form phrase input by user
\[ P(w1 w2 w3 w4) = l1 * c(w1+w2+w3+w4) / c(w1+w2+w3) + \] \[ l2 * c(w2+w3+w4) / c(w2+w3) + \] \[ l3 * c(w3+w4) / c(w3) + \] \[ l4 * c(w4) / sum of frequencies of all Unigrams, \]
Example: In sample phrase, “Hey sunshine, can you follow me and make me the __”, the candidates for prediction: happiest and most are compared by substituting w1 = “make”, w2 = “me”, w3 = “the”, and w4 = (“happiest”,“most”, …) for all candidates and pick the word with highest probability