Amer Kanaan
26/02/2020
Amer Kanaan-Interactive Word Prediction Model (or AM-IWPM) is a Shiny App made with a user-friendly interface that predicts next word according to an entered text. It is interactive, fast, and relatively useful in predicting words with an interface similar to a mobile phone text predictor.
Link to App: https://ameerkanaan.shinyapps.io/WordPredictor/
The app utilizes the Stupid Backoff algorithm to make predictions. In summary, this algorithm uses a pre-existing corpus of thousands of sentences, counts its words, and extracts predictions [The main equation is attached].
It builds on fast libraries to retrieve data. AM-IWPM contributed creatively by making a group of corpus datasets that have been indexed & cleaned in a way that allows the algorithm to be super fast and memory-friendly without losing efficiency.
In particular, the function itself doesn't calculate a lot, and most calculations are previously done and embedded in the datasets.
This app is as fast as a blink of an eye. It's 20% of times precise about its top-3 predictions.
Benchmarking the app with 28464 predictions showed:
1- Overall top-3 precision: 21.19 %
2- Overall top-1 precision: 13.13 %
3- Overall top-3 score: 17.37 %
4- Average runtime: 25.94 msec
5- Total memory used: 63.27 MB
AM-IWPM provides a memory and speed efficent solution for word prediction. It is reliable and easy to use, and allows for interaction with the user. In this sense, it fulfills all the basic capacities of a text prediction app.