linhns@website:~ $ ls
linhns@website:~ $ cd projects
linhns@website:~/projects $ cat nextwordpredictor/index.md

NextWordPredictor

NWP is a input suggestor. It simply takes what user types and generates suggestions for the next word.

NextWordPredictor UI

Tech stack

Frontend: RMarkdown

Backend: R, Shiny

Features

  • Simple UI
  • Sensible prediction

What I did

Everything

Implementation

Suggestions are based from a corpus of tweets, news and blogs, which are then filtered to remove profanities, punctuations and converted to lowercase. Further analysis shows that when users type a word, it is more likely that they are using a collocation of two words, therefore suggestions mainly focus on bigrams, with trigrams less considered. For example typing go will give 3 suggestions of to, on, and home, all of which form phrases that are ubiquitous in daily life.

linhns@website:~/projects $ |