June 2026

Why I Built This App

When you are typing on a phone or a laptop, waiting for text recommendations can be annoying if the app is slow or freezing.

  • The Problem: Many text prediction models are too big and slow down your web browser.
  • The Goal: Build a lean, fast application that predicts words accurately without draining memory.
  • The Result: A clean, easy-to-use Shiny web app that works perfectly on any device.

How the Algorithm Works

Instead of using massive, complicated AI neural networks that crash, my model uses a smart, quick three-step search strategy:

  • Step 1 (Cleaning): The app takes whatever you typed, changes it to lowercase, and deletes all punctuation marks.
  • Step 2 (The Search): It looks at your last two words and checks our 3-word phrase list. If nothing is found, it backs off to check the last single word in our 2-word phrase list.
  • Step 3 (Safety Switch): If you type a completely new word the app has never seen, it safely gives you the default word “the” to stop the application from crashing.

App Features and How to Use It

The front end of the website is built to be simple so you can test it immediately using the built-in testing hints:

  1. The Input Box: You type an incomplete English phrase or sentence directly into the text box.
    • Hint: Type a known phrase like “The weather forecast” or a random news sentence.
  2. The Run Button: You click the green “Find Next Word” button to trigger the calculation when you are ready.
  3. The Text Tracker: A built-in history box shows you exactly what you typed so you can verify the app read your text.
  4. The Output: The final single-word prediction lights up clearly on your screen in a green panel.
    • Hint: Testing “The weather forecast” yields “says”, while random sentences fallback safely to “the”.

Speed and Performance Results

By using efficient data structures, this prototype app balances search speed with a simple setup:

  • Fast Search Latency: By using indexed R data.table keys, the app finds matching words in less than 15 milliseconds once loaded.
  • Crash Proof: Thanks to the built-in fallback step, testers can type any unique word from Twitter or the news and the app safely defaults to “the” instead of crashing.
  • Prototype Scale: The model runs its data processing directly in the computer’s memory, making it an ideal, lightweight proof-of-concept.

Try It Live!

This project shows how you can take basic word-counting math and turn it into a helpful, interactive everyday tool.