November 03, 2026

Project Overview

Next Word Prediction Application

The goal of the Johns Hopkins University Data Science Capstone is to demonstrate a natural language processing (NLP) application that predicts the next word from a user-entered phrase.

  • Application: Open the Shiny app
  • Interface: R Shiny web application
  • User workflow: Enter a phrase and inspect the displayed prediction or suggestions.

Note: This presentation describes the standard capstone workflow. The linked app’s implementation has not been independently verified.

Natural Language Processing Approach

A typical next-word prediction system follows these steps:

  1. Collect a representative text corpus.
  2. Clean and normalize text (including punctuation and whitespace).
  3. Tokenize the text into words and generate n-grams.
  4. Count common word sequences and estimate next-word candidates.
  5. Apply a fallback strategy when longer sequences are not found.

The exact preprocessing rules, n-gram sizes, and ranking method used by the linked app are not verified.

Shiny Application

Try the interactive demonstration

Launch the Coursera Shiny Capstone app

The Shiny interface is the interactive component of the project. Open the application and try several input phrases to assess how it responds.

Suggested inputs for demonstration:

  • the best way to
  • I would like to
  • thank you for

These are test prompts, not recorded test results.

Evaluation and Limitations

For a reproducible evaluation, a next-word prediction system should be tested on a held-out dataset.

  • Top-1 accuracy: proportion of cases where the highest-ranked suggestion matches the next word.
  • Top-k accuracy: proportion of cases where the actual next word appears among the top k suggestions.
  • Responsiveness: time needed to return a prediction.
  • Limitations: rare phrases, out-of-vocabulary words, ambiguous contexts, and domain-specific language.

No numerical accuracy or latency is claimed here because verified results for this particular app are unavailable.

Conclusion and Resources

A Shiny interface makes an NLP prediction workflow accessible through a browser. N-gram models are a straightforward baseline for exploring how local word context can support next-word suggestions.

Attribution: The linked Shiny app is a third-party reference. This slide deck does not claim ownership of that app or its underlying implementation.