December 2, 2018

Introduction

This smart keyboard application is a minimum viable product for the Coursera Data Science Capstone.

To use the app, type an English message in the input box and the algorithm will recommend the best 3 words based on your input text.

App Site: slmf1995.shinyapps.io/apps

Tab: Smart Keyboard

Use Case

This app is capable of assisting our users to autocomplete their sentences.

In an actual product, a click on the suggested word instantly populates the input field with the chosen word.

Here's an example scenario below.


In above, clicking on "year" instantly completes the desired sentence!

Our Algorithm

This application uses a mixed combination of n-gram and skip-k 2-gram models. These models are trained using 3.5% of the Swiftkey corpus obtained from Coursera Data Science Capstone.

Using the backoff approach, the model selects the best 3 word prediction in the following order of hierarchy:

  • 4-gram model

  • 3-gram model

  • 2-gram model

  • Skip-1 2-gram model

  • Skip-2 2-gram model

Further Developments

  • Training on larger dataset to increase model vocabulary

  • Autocorrecting incorrect inputs for better prediction of new word

  • Using machine learning models to improve model performance

  • Expanding smart keyboard to other languages