Problem & Motivation

Typing is time-consuming and repetitive, especially in mobile messaging, emails, and search engines.

This project builds a simple predictive text system that suggests the next most likely word based on user input.

Applications include: - Smartphone keyboards (autocomplete) - Search engine suggestions - Messaging and email assistance

Objective

The goal is to build a real-time next-word prediction system that: - Accepts a phrase as input - Processes the text using NLP techniques - Predicts the most likely next word

This demonstrates a simplified version of modern autocomplete systems.

Algorithm (How it works)

This app uses an N-gram language model.

Steps: 1. Text preprocessing - Convert to lowercase - Remove punctuation - Tokenize words

  1. Build N-grams
    • Unigrams (single words)
    • Bigrams (pairs of words)
    • Trigrams (triplets of words)
  2. Prediction logic
    • Try trigram match first
    • If not found → bigram match
    • If still not found → return most frequent word (backoff)

This ensures a prediction is always returned.

Application Demo

Shiny Web App Features: - Text input box - “Predict” button - Instant output of next word

Example: Input: “I want to” Output: “eat”

Technology used: - R programming - Shiny framework - N-gram frequency model

Impact & Future Improvements

Impact: - Demonstrates real-time NLP prediction - Lightweight and fast system - Works without complex machine learning models

Limitations: - Small dataset used - Limited vocabulary - Does not understand deep context

Future Improvements: - Train on large Twitter/news datasets - Use deep learning (LSTM / Transformer models) - Improve accuracy with smoothing techniques

Conclusion: This project demonstrates a functional prototype of predictive text systems used in modern applications.