2024-11-05

Project Overview

This is a Shiny web application that predicts the next word based on user input. It uses natural language processing techniques to analyze patterns in text and suggest the most likely next word in a sequence. The app is designed to be simple, user-friendly, and efficient.

How It Works

  • The app uses n-gram models (bigrams and trigrams) for prediction
  • When you type a word or phrase, the app:
    • First tries to match your last two words with trigrams
    • If no match found, tries to match your last word with bigrams
    • Returns the most frequently occurring next word from the matches

Features & Usage

  • Simple, clean interface with single text input
  • Real-time word prediction
  • Easy three-step usage:
    1. Enter your text in the input box
    2. Click “Predict Next Word” button
    3. View the predicted next word in results panel

Example Usage

Input: “the”, Predicted Next Word: “same”

Input: “thank you”, Predicted Next Word: “for”

Input: “I love”, Predicted Next Word: “you”

Input: “looking forward”, Predicted Next Word: “to”

This project demonstrates practical application of natural language processing in creating a user-friendly text prediction tool.