For this prediction algorithm, files created from an organization and cleaning process that was made to the files provided by the SwiftKey application will be used; the files created contain the quadgram, trigram and bigram, and these in turn are ordered by frequency in descending order.
To create the prediction algorithm, firstly, load the previously affected files, then clean up the entered word or sentence, converting all letters to lowercase and removing punctuation and numbers from it, later prediction, using the quadgram first, with the last 3 words of the sentence entered as input, the first 3 words of the quadgram, in case of not finding a quadgram, uses the trigram, which has the same logic from the quadgram, only that with two words, finally in case of not finding a trigram, the bigram is used and if a bigram is not found, the algorithm returns the word with the most frequency as a result of the prediction.