January 2026

Slide 1: Project Overview

Problem: Users often need help predicting the next word while typing.
Goal: Build a Shiny app that predicts the next word in a phrase using n-gram modeling.
Audience: Anyone who wants to speed up typing or autocomplete phrases.

Slide 2: Algorithm

  • Approach: N-gram backoff model
    • Trigrams: Predict next word using last two words
    • Bigrams: If trigram not found, use last word
    • Unigrams: If nothing found, use most common word
  • Text Cleaning: Convert to lowercase, remove punctuation, remove extra spaces
  • Data: Sample training data of English phrases

Slide 3: App Overview

  • Input: User types a phrase in a text box
  • Action: Click “Predict Next Word”
  • Output: Predicted next word is displayed
  • Implementation: Shiny app using R, prediction.R logic, ngrams.RData data

Slide 4: User Experience

  • Simple and clean interface
  • Works for multiple example phrases:
    • data science ispowerful
    • the stock marketis
    • one of the mostimportant
  • Provides quick, accurate prediction

Slide 5: Takeaway

  • Novelty: Small, fast n-gram backoff model for real-time predictions
  • Scalability: Can extend to larger corpora for better accuracy
  • Conclusion: User-friendly, functional app ready to demonstrate predictive text capabilities