Svift-Kee

MB

11 6 2021

Typing takes up too much of your time?

Then Svift-Kee is for you! It is…

How it works

Svift-Kee takes the last 1-3 words of a text input and provides three possible follow-up words. Simply click on the one you want and Svift-Kee adds it straight to your text!

What’s behind it

Svift-Kee relies on a data analysis of text examples from blogs, twitter and news pages. Of course, all profanities and racist words were excluded, so Svift-Kee helps making the internet a friendlier place!

The algorithm behind it relies on the Kneser-Ney method for predicting new words. After trying three different models for smoothing the data and prediciting new words, the creators of Svift-Kee have found Kneser-Ney modelling to have the best accuracy.

Performance

The performance of Svift-Kee was enhanced by filtering the data in an intelligent way and using the R package data.table to process the underlying data. This reduced the needed time by almost half!

# using data.frames
source("predict_word4.R")
system.time(predict_word4("make me the"))
##    user  system elapsed 
##    5.09    0.76    7.33
# using data.table
source("predict_word45R.R")
system.time(predict_word45("make me the"))
##    user  system elapsed 
##    7.14    0.42    8.26