2025-08-05

The Problem

Typing is slow and error-prone.

We want smart next-word prediction on mobile and web.

Our Solution

  • Built a Shiny app using n-gram model
  • Uses trigrams and bigrams to predict next word
  • Lightweight and runs in the browser

Demo

# Example prediction simulation
predict_next_word <- function(text) {
  if (text == "i love") return("you")
  if (text == "how are") return("you")
  return("(prediction not found)")
}
predict_next_word("i love")
## [1] "you"