Simple word prediction application (Capstone Coursera Project)

George Fandeev

Simple word prediction app

Simple in use Words prediction.

Are you tired from

  • a lot of buttons, checkboxes and inputs?
  • low speed of app?
  • difficult settings?
  • annoying colors?

Let's look my new product - minimalistic word prediction application!

Advantages

There are not extra features. Only input, predicted words, and button “About”.

It is so simple that it can be used by a child!

Screenshot

How does it work?

Basis of my app: 1%-sample of English blogs, news and tweets dataset. When you type phrase into input textbox the following actions are produced:

  1. Your phrase prepared (cleared of non-alphabet symbols)
  2. If your phrase are longer than 4 words, it will be reduced to the 4 last words.
  3. App looks up for the longest n-gram for your phrase.
  4. Your phrase is reduced (the first word is deleted). App looks up for the second longest n-gram for your phrase. And so on. Until the 2-gram.
  5. Finally there are a table of estimated next words. Correct it with “stupid backoff” (you can read about it here) algorithm and show you the most credible words!

Example

I will show your an example. We will predict a phrase “I love<3”:

require(ngram)
load("ngrams_data.RData", envir=.GlobalEnv)
phrase <- "I love<3" 
#phrase will be cleared of "<3"
#1 means number of predicted words
predictfun(phrase, 1)
[1] "you"

Unfortunatelly I have no more space to tell you about my application. Please invest in my project and I'll make it much better! Thank you for attention!

Any questions? george.fandev@gmail.com